Liudeius Posted February 10, 2013 Share Posted February 10, 2013 (edited) 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 February 10, 2013 by Liudeius Link to comment Share on other sites More sharing options...
scrivener07 Posted February 10, 2013 Share Posted February 10, 2013 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 More sharing options...
Liudeius Posted February 10, 2013 Author Share Posted February 10, 2013 Oh, when I searched on google someone mentioned "Events or If statements" so I tried an if statement and it didn't work. This does though, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts