complex if> not working

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

complex if> not working

Post by Mark Gevry » Sat May 21, 2005 5:36 am

Hi. This script im doing reads 4 cards, the same number card, but different suit. When i use complex if expressions, it wont do anything. When i use regular if expressions, it works...EX:

COMPLEX
label>read
GRC>333,444,555,111,card1
if>{(%card1%=3455345) OR (%card1%=845645) or (%card1%=543553) OR (%card1=235645)} then
let>card1=7
goto>7
endif
goto>read
////////////////////
label>7
message> the card is a seven

THIS COMPLEX STATEMENT WILL NOT WORK! But the following code will.
Lets say it was a 2 of hearts...

label>read
grc>x1,y1,x2,y2,card1
if>card1=435345,2
goto>read
//////////////////
label>2
messagemodal>the card is a 2!!!!!!

THAT WILL WORK!! Is my complex if statement incorrect? Help!

Kind Regards,
Mark

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sat May 21, 2005 7:25 am

Remove then from the end of the If line:

if>{(%card1%=3455345) OR (%card1%=845645) or (%card1%=543553) OR (%card1=235645)}
MJT Net Support
[email protected]

Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

Post by Mark Gevry » Sat May 21, 2005 5:02 pm

Thanks a lot
Last edited by Mark Gevry on Sun May 22, 2005 9:55 pm, edited 1 time in total.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sat May 21, 2005 6:29 pm

support wrote:Remove then from the end of the If line:

if>{(%card1%=3455345) OR (%card1%=845645) or (%card1%=543553) OR (%card1=235645)}
May be a typo that's already corrected but the 4th "%card1%" is missing the final "%"

Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

Post by Mark Gevry » Sat May 21, 2005 7:14 pm

No... Thats not it I just did a type when making a subject. in the script it is not like that... thanks though.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts