Trying to get a handle on what is and isn't allowed in Papyrus. Right now, the following refuses to compile:
Event OnUpdate()If (Variable1 >= 40) && (Variable2 < 1)MySecondFunction()EndIfRegisterForSingleUpdate(0.5)endEvent
If I get rid of the if / endif, it likes it. If I move everything between Event / endEvent inside the main Function, it likes it. But having an if / endif (or while / endwhile) anywhere but inside the Function / EndFunction which gets called? Fails every time. I don't know how I'm supposed to have Events and other Functions in my script if I can't use important conditional checks inside them.