You can't use OR in scripting. If you do, then it won't work.
?
Yes it will.
Didn't work for me. Had to separate them.
I don't understand. Sometimes they work, and other times, they don't.
Well, post what doesn't work and maybe we can tell you what's wrong.
It's working now, after I separate the statements, but it didn't before when I used the OR.
Of course! And here I was using OAR the whole time! XD
Nah. I mean that I separate the statements without using or, and it's working. Didn't work while I was using or.
That's so confusing haha!
Do you mean like this?
IF %VARY1 = 2 OR %VARY2 <10 THEN %OTHER := 100 (Doesn't Work?)
It was -
IF %HCAVALRY1 > 0 OR IF %LCAVALRY1 > 0 THEN
IF %X1SPEAR > 0 THEN
BEGIN
%LLANE1A := %LLANE1A + 3
%LLANE1D := %LLANE1D + 5
END
Might be worth trying it this way -
Well, I'll keep that in mind next time. Do you have any idea why the current one doesn't work?
Your first IF statement is left open without the BEGIN/END in the above case.
But it works for every other statements, that don't contain the OR variable.
I'm not 100% sure, but based on my experience with other scripting languages, I suspect you need to drop the second 'IF.'
I.E., try 'IF [statement] OR [statement]' not 'IF [statement] OR IF [statement].'
Nah. It's going to say something like [Cannot find symbol statement]
No, Morgan is right lol. Statements go:
IF %Variable01 = 5 OR %Variable02 = 4 THEN
XXXXXXX
You were just using it wrong.
Yes. That's right. I didn't realize that I had the same exact format in the actual scripts. If I had actually typed it in the wrong way, the editor would pop a error message. The thing is, I tried it just like that, no error, yet it didn't work.