Help converting an if statement

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

Furor
a lesser mummy
a lesser mummy
Posts: 44
Joined: Sun Nov 30, 2003 8:25 pm

Help converting an if statement

Post by Furor » Thu May 06, 2004 4:31 am

just need some help with this. and to see if I am doing it the best way.

Code: Select all

/if $target(id)!=@TargetId /goto :EndAF
is the old code

Code: Select all

/if (${String[${Target.ID}].NotEqual[${String[${TargetId}]}]}) /goto :EndAF
That looks sloppy to me. But there is not something like

Code: Select all

 ${Int[${blah}].NotEqual[${blah1}]}
unless I missed something.

Thanks
Furor

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Thu May 06, 2004 4:44 am

would this do it ?

Code: Select all

/if (${Target.ID}!=${TargetId}) /goto :EndAF

Furor
a lesser mummy
a lesser mummy
Posts: 44
Joined: Sun Nov 30, 2003 8:25 pm

Post by Furor » Fri May 07, 2004 10:27 pm

Thanks Fuer that did the trick. I don't know what I was thinking lol. Thought Lax did away with the != sign.

After about 30mins of staring at your avatar I finally read your post and fixed my macro LOL

Thanks
Furor

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

Post by Fuergrissa » Sat May 08, 2004 3:37 am

its nice to go from a "taker" on these forums to actually understanding a little to be able to give back.
I am kinda keen on that avatar :)