Error Parsing Expression

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
markyg03
Newbie
Posts: 3
Joined: Wed Sep 22, 2010 1:37 am

Error Parsing Expression

Post by markyg03 » Wed Sep 22, 2010 1:39 am

I am stumped. I know the answer is right in front of my eyes but i can't see it. Whats wrong with this code?

if>{(%card1%=46772787) OR (%card1%=46680165) OR (%card1%=6439945) OR (%card1%=64777281)}
goto>clickCardOne
endif>

Says Error Parsing or whatever..

Thanks.

mark

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Wed Sep 22, 2010 2:45 am

You will get that error when the variable card1 is not assigned a value. Set it to some value before the If and you should be good.

Like so:

Code: Select all

Let>card1=1
if>{(%card1%=46772787) OR (%card1%=46680165) OR (%card1%=6439945) OR (%card1%=64777281)}
goto>clickCardOne
endif> 

One other thing..... Don't put a > after Endif. My version 12.0.8 didn't complain, however the help file clearly shows that as incorrect.
Last edited by adroege on Wed Sep 22, 2010 2:47 am, edited 1 time in total.

markyg03
Newbie
Posts: 3
Joined: Wed Sep 22, 2010 1:37 am

Post by markyg03 » Wed Sep 22, 2010 2:47 am

Do I have to do that even when I technically did assign it a variable? At the beginning of my code I have a GRC> and card1 as the result..

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Wed Sep 22, 2010 2:51 am

However you assign the value should be fine..... I suspect though that you have a syntax issue with your GRC> or else the code branches around that statement.


Look in the watch list while stepping through the code to see if the variable card1 is created and assigned a value like you expect.

markyg03
Newbie
Posts: 3
Joined: Wed Sep 22, 2010 1:37 am

Post by markyg03 » Wed Sep 22, 2010 7:20 pm

Just wanted to say it was a silly error. Originally when I was writing my complex expressions, I never put % signs around my variable. So I did a Find and Replace, so for instance I would type in Card1, replace all with %card1%. I never thought to check my GRC that now had percent signs around it! Silly me.

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