Jump to content

Compiling Papyrus


Liudeius

Recommended Posts

Every time I try to compile my script, it fails on the first period or parenthesis.

 

I'm typing my script in notepad, renaming it to .psc (notepad++ won't allow me to save a .psc) and compiling it with Creation Kit (notepad++ with the .bat has an error because it looks for the path C:\Projects).

This is the script I have written.

ScriptName UseWul extends Form

GlobalVariable Property AllowWul auto

AllowWul.SetValue(0)
RegisterForSingleUpdate(5)

Event OnUpdate()
AllowWul.SetValue(1)
endEvent

This one fails at 5,8

 

Is there something I'm doing wrong in writing my script, or am I compiling it wrong?

Edited by Liudeius
Link to comment
Share on other sites

ScriptName UseWul extends Form

GlobalVariable Property AllowWul auto


Event OnInit()
AllowWul.SetValue(0) ;Methods need to be inside events or functions. 
RegisterForSingleUpdate(5) ; You cannot call functions outside event blocks or other functions.
EndEvent


Event OnUpdate()
       AllowWul.SetValue(1)
endEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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