NEVER MIND - Nesting If Statements With Variables

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

NEVER MIND - Nesting If Statements With Variables

Post by PaulSR » Mon Dec 02, 2013 12:18 pm

Hi,

I'm pretty sure this is nothing more than syntax specifically my lack of {} brackets but I hoped I could get an expert opinion.

Here's the code in question :

Code: Select all

If>CPET>0
    If %GrossValue%<0
        %GrossValue%=%GrossValue%*-1
    Endif
Endif
The first If is fine and works as expected but the second relating to GrossValue simply proceeds regardless of the outcome making me think it's not recognising the variable?

Thanks in advance for any assistance !
Last edited by PaulSR on Mon Dec 02, 2013 12:27 pm, edited 1 time in total.

PaulSR
Pro Scripter
Posts: 65
Joined: Mon Aug 05, 2013 2:58 pm
Location: Edinburgh/Peterborough

Post by PaulSR » Mon Dec 02, 2013 12:27 pm

Ignore this - I spotted the doofus lack of

If>

:oops:

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