Non-threaded

Forums » Bugs & Problems » Read Thread

Post reports about problems or bugs in here.
This bug was closed 4/13/2015: Killa and Morgan and Berka solved this

OR in Scripting will never ever work. Ever.

9 years ago

You can't use OR in scripting. If you do, then it won't work. 

OR in Scripting will never ever work. Ever.

9 years ago

?

Yes it will.

OR in Scripting will never ever work. Ever.

9 years ago

Didn't work for me. Had to separate them. 

OR in Scripting will never ever work. Ever.

9 years ago

I don't understand. Sometimes they work, and other times, they don't. 

OR in Scripting will never ever work. Ever.

9 years ago

Well, post what doesn't work and maybe we can tell you what's wrong.

OR in Scripting will never ever work. Ever.

9 years ago

It's working now, after I separate the statements, but it didn't before when I used the OR. 

OR in Scripting will never ever work. Ever.

9 years ago

Of course! And here I was using OAR the whole time!  XD

OR in Scripting will never ever work. Ever.

9 years ago

Nah. I mean that I separate the statements without using or, and it's working. Didn't work while I was using or. 

OR in Scripting will never ever work. Ever.

9 years ago

That's so confusing haha!

Do you mean like this?

IF %VARY1 = 2 OR %VARY2 <10 THEN %OTHER := 100 (Doesn't Work?)

OR in Scripting will never ever work. Ever.

9 years ago

It was -

IF %HCAVALRY1 > 0 OR IF %LCAVALRY1 > 0 THEN

IF %X1SPEAR > 0 THEN

BEGIN

%LLANE1A := %LLANE1A + 3

%LLANE1D := %LLANE1D + 5

END

OR in Scripting will never ever work. Ever.

9 years ago

Might be worth trying it this way -

IF %HCAVALRY1 > 0 OR IF %LCAVALRY1 > 0 THEN

BEGIN

IF %X1SPEAR > 0 THEN

BEGIN

%LLANE1A := %LLANE1A + 3

%LLANE1D := %LLANE1D + 5

END

END

OR in Scripting will never ever work. Ever.

9 years ago

Well, I'll keep that in mind next time. Do you have any idea why the current one doesn't work? 

OR in Scripting will never ever work. Ever.

9 years ago

Your first IF statement is left open without the BEGIN/END in the above case.

OR in Scripting will never ever work. Ever.

9 years ago

But it works for every other statements, that don't contain the OR variable. 

OR in Scripting will never ever work. Ever.

9 years ago

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].'

OR in Scripting will never ever work. Ever.

9 years ago

Nah. It's going to say something like [Cannot find symbol statement]

OR in Scripting will never ever work. Ever.

9 years ago

No, Morgan is right lol. Statements go:

IF %Variable01 = 5 OR %Variable02 = 4 THEN

XXXXXXX

You were just using it wrong.

OR in Scripting will never ever work. Ever.

9 years ago

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.