Jump to content

Need help with sexlab payprus coding


lord_vader

Recommended Posts

Whenever I try to compile a code that involves sexlab framework I receive the following error 

 

Quote

 

 

The Elder Scrolls V Skyrim Legendary Edition\Data\scripts\source\sslThreadModel.psc(1103,4): halt is not a variable
 
Starting 1 compile threads for 1 files...
Compiling "sslMatchMaker"...
No output generated for sslMatchMaker, compilation failed.
 
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on sslMatchMaker

 

I tried the following to fix the issue:

*Reinstalled skse

*Set windows language to U.S. english

*Installed SkyUI_5.1_SDK

 

None of these solved the issue

 

please help !

Link to comment

Dear CPU

 

Thank you for your reply

 

Here is the code ( I haven't made any modifications to the original code yet I just wanted to test if CK compiler works perfectly)

 

 

scriptname sslMatchMaker extends ReferenceAlias

; ##################################################; #                                                #; #         MatchMaker Stored Variables            #; #                                                #; ##################################################; Load the SexLab Framework API for useSexLabFramework property SexLab auto; Fastest method of referring to player;  -  Significantly faster than using Game.GetPlayer()Actor property PlayerRef auto; Actor selection storageActor[] property Slots auto hidden; Our spellsSpell property MatchMakerSpellTarget autoSpell property MatchMakerSpellSelf autoSpell property MatchMakerSpellBuff auto; The static save file version number for SexLabMatchMaker;  -  used for future updates.int version = 7; Trigger lock to make sure we don't accidentally call TriggerSex() more than once on the same set of actors after; another's spell effect expires. Used as part of WaitLock() and ResetSlots()bool _Locked; ##################################################; #                                                #; #         MatchMaker Animation Handlers          #; #                                                #; ##################################################; Called from spell, validates the target and places actor in storage for scene use.; Returns True if the actor is successfully added to storage, False if they fail to validate.bool function RegisterActor(Actor ActorRef)    ; Validate we can add the actor before trying to register them.    ;  - Actor is valid target for starting an animation    ;  - We have room for more actors in our scene - SexLab can only handle 5 actors at the most.    ;  - Actor is not currently in our Slots array    if SexLab.IsValidActor(ActorRef) && Slots.Length <= 5 && Slots.Find(ActorRef) == -1        ; Actor has passed pre-registration checks, continue with the registration!        ;  -  Push the actor onto the end of our actors array using SexLab's array utility functions.        Slots = sslUtility.PushActor(ActorRef, Slots)        ; if we've now reached our limit of 5, skip waiting for more actors to have their spell effect expire, lets just get started now.        if Slots.Length >= 5            TriggerSex()        endIf        return true ; We have successfully registered the actor into slots or started animation.    else        return false ; Failed pre-registration check    endIfendFunction; Takes our current Slots array and attempts to start a sex scene using the contained actors, however many actors it has, between 1 and 3.function TriggerSex()    ; Don't allow multiple instances to try and start a scene since we only keep a single actor Slots array.    WaitLock()    ; All animations SexLab expect the female to the first actor given to it. So make sure we have the female actors in front of the array so animation positions    ; are properly set, SortActors() from SexLab will return the given array with females moved to the front of the array by default.    ; This is an optional step in the event that you specifically want to set the actors in specific roles within the animation.    Slots = SexLab.SortActors(Slots)    ; Claim an available animation thread from SexLab we can add our actors to.    sslThreadModel Thread = SexLab.NewThread()    ; Add all our actors at once into the scene using all default settings.    if !Thread.AddActors(Slots)        Debug.Trace("--- SexLab MatchMaker --- Failed to slot one of the actors into the animation thread - See debug log for details.")        ResetSlots() ; Clear the slots and reset the wait lock.        return ; Stop the function now since we failed to add the actor.    endIf    ; Set our custom hook name "MatchMaker" in the thread.    Thread.SetHook("MatchMaker")    ; Register our script to respond to the hook's event that is triggered at the end of animation.    ;  -  If an event was registered for just "HookAnimationEnd" it would be attached to the global hook and be triggered after EVERY scene started by SexLab    ;  -  _MatchMaker makes it a non global hook that is called from our above Thread.SetHook("MatchMaker") so we can focus on just the end event we want.    RegisterForModEvent("HookAnimationEnd_MatchMaker", "AnimationEnd")    ; Since this is just a basic example, we'll keep the scene simple and let SexLab and player configuration figure out most of the stuff on it's own.    ; a.k.a. Ooohhh yeah, 
Thread.StartThread() ; We are done with our registered actors, so reset both our actor Slots array and lock bool so MatchMaker can be used again. ResetSlots()endFunction; Our AnimationEnd hook, called from the RegisterForModEvent("HookAnimationEnd_MatchMaker", "AnimationEnd") in TriggerSex(); - HookAnimationEnd is sent by SexLab called once the sex animation has fully stopped.event AnimationEnd(int ThreadID, bool HasPlayer) ; Get the thread that triggered this event via the thread id sslThreadController Thread = SexLab.GetController(ThreadID) ; Get our list of actors that were in this animation thread. Actor[] Positions = Thread.Positions ; Loop through our list of actors a and display some flavor text. ; - This is rather pointless use of hooks, but this supposed to be an example, so whatever. int i = Positions.Length while i > 0 i -= 1 Debug.Notification(Positions.GetLeveledActorBase().GetName() + "'s irresistible aura fades.") endWhileendEvent; ##################################################; # #; # MatchMaker Internal System Functions #; # #; ##################################################; Simple wait lock function to keep function thread safe so only one instance can run it at a time.; - In the rare unlikely event that something bad happens, we want to avoid an infinite loop, so cap the wait time at 10 seconds. Better safe than sorry.; - An infinite loop here is very unlikely, but unlikely does not mean impossible, and an infinite loop could completely kill the mod or users save file.function WaitLock() ; Start timer looping for freed lock or 10 seconds to pass. float GiveUpTimer = Utility.GetcurrentRealTime() + 10.0 while _Locked && Utility.GetCurrentRealTime() < GiveUpTimer Utility.WaitMenuMode(0.5) endWhile ; Once we've exited the wait lock we need to lock it ourselves so other threads attempting to start wait at the while loop. _Locked = trueendFunction; Initializes the MatchMaker script back to a state with no registered actorsfunction ResetSlots() ; Empty out the Slots array by initializing it to a new empty array. Actor[] emptyslots Slots = emptyslots ; Unlock our TriggerSex() function for future use. _Locked = falseendFunction; Reset registered actors and lock whenever player reloads their game.; Ensures we start out in a usable state on every load; just in case.event OnPlayerLoadGame() ; Give player target spell if they don't have it if !PlayerRef.HasSpell(MatchMakerSpellTarget) PlayerRef.AddSpell(MatchMakerSpellTarget, true) endIf ; Give player self spell if they don't have it if !PlayerRef.HasSpell(MatchMakerSpellSelf) PlayerRef.AddSpell(MatchMakerSpellSelf, true) endIf ; Reset the script and prepare for accepting new actors ResetSlots()endEvent; Called on first startup with mod enabled - first startup does not trigger OnPlayerLoadGame()event OnInit() OnPlayerLoadGame()endEvent

 

Link to comment

Whoa. If you try to recompile match make, and you never had any sexlab compiling experience, it will be really hard for you to understand what is going on.

MatchMaker is really goo written, but I will never suggest it as basic "let's learn how to use SexLab" script.

 

If you are going to learn, try to download my Papyrusguide, and go directly to the section of SexLab.

if you need more (I have no idea about yout level of expertise on Papyrus), then maybe you can read the full guide, or just PM me with "What I want do to do is..."

 

Link to comment

Compiling SexLab or MatchMaker requires that you have a bunch of dependent files.

Possible it is possible, but for sure not easy.

 

Also: what is the version of SexLab you are using? On SL 1.6 HF2 there is no "halt" function on line 1103.

(It is later.)

Link to comment

Compiling SexLab or MatchMaker requires that you have a bunch of dependent files.

Possible it is possible, but for sure not easy.

 

Also: what is the version of SexLab you are using? On SL 1.6 HF2 there is no "halt" function on line 1103.

(It is later.)

 

 

I'm using SL 1.6 HF2. Isn't it the newest version ?

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use