Jump to content

Creating a mod - need help with a script


Recommended Posts

Posted

Hello all,

 

I am creating a mod for the first time in Skyrim and I am messing around with the stuff in the API wiki I am trying to get the HookScript example to work but I always get this error:

 

"\Data\Scripts\Source\temp\sldes.psc(8,8): required (...)+ loop did not match anything at input '('

No output generated for sldes, compilation failed."
 
This is the code I am looking at from the API
ScriptName sldes extends Quest

SexLabFramework property SexLab auto

event OnInit()
    ; // Register globally onto AnimationEnd, with our callback PlayerSatiate whenever the script is first initialized
  	RegisterForModEvent("AnimationEnd", "PlayerSatiate")
endEvent()

; // Our callback we registered onto the global event AnimationEnd
event PlayerSatiate(string eventName, string argString, float argNum, form sender)
    ; // Use the HookController() function to get thread controller that triggered this event
    sslThreadController controller = SexLab.HookController(argString)
    ; // Get the players position from the thread, -1 if player wasn't involved
    int player = controller.GetPlayerPosition()
    ; // Only show our satiation message if player was involved
    if player >= 0
        Debug.Notification("You feel a little more satisfied after that bit of fun...")
    endIf
endEvent

I have created a new quest object for this that runs at start up, is that correct as well?

 

Posted

Thanks!

 

I am now getting many errors like "Data\Scripts\Source\sslAnimationFactory.psc(46,1): RegisterForModEvent is not a function or does not exist"

 

I don't think I have called the framework properly, Do I need to add it in the property or call it somehow?

Archived

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

  • Recently Browsing   0 members

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