Page 1 of 1

Probable bug in /IF

Posted: Sun Nov 23, 2003 11:59 pm
by Guest
/if $char(speed)<=0.2 /press Num_Lock | Makes the char move foward if standing still

/if $char(speed)<=.2 /press Num_Lock | Does nothing.


Thanks,
New Lurker...

Posted: Mon Nov 24, 2003 1:24 am
by wassup
Use search to find numeric comparisons, or read the readme.html in MQ1.

Posted: Mon Nov 24, 2003 4:03 am
by ap50
In other words, put an n between /if and $char

Posted: Mon Nov 24, 2003 8:11 pm
by Guest
Actually, my point was that I'd found this line used in a dozen macros posted here. So it exists on god knows how many ppls machines and doesn't work for them either. Obviously the line doesn't work with out a 0 in front of the .2 for the comparison to complete so I guess I'll just repair my own version of MQ so other ppls broken macros work properly without having to alter them. :>

Posted: Mon Nov 24, 2003 9:31 pm
by wassup
Sorry *Guest*, I guess you will have to just go ahead and perform your exercise in futility instead of listening to people who have a clue.

Posted: Mon Nov 24, 2003 10:37 pm
by theafkxper
settle down...
hes just stating that 0.2 works and .2 requires the N, there was no offense ment by it im sure.

Posted: Mon Nov 24, 2003 10:46 pm
by wassup
No problem...


1. .2 works
2. 0.2 doesn't

Answer: Use #1

Posted: Mon Nov 24, 2003 11:23 pm
by dont_know_at_all
/if $char(speed)<=0.2 /press Num_Lock | Makes the char move foward if standing still

This doesn't work. That's the point. Mr Lurker here thinks it works, but he's busily toggle his run on and off.

/if <arg><operator><arg> -- character comparison
/if n <arg><operator><arg> -- numeric comparison

Posted: Tue Nov 25, 2003 12:43 am
by wassup
Hiya dkaa!

I was giving an answer to theafkxper.

I knew it was because of the missing n, but no one wanted to listen to the suggestions by me and you so I just said the heck with it, and let them believe what they want to believe.

If they don't believe it's because of the missing n then let them try other ways.

Posted: Tue Nov 25, 2003 2:19 pm
by theafkxper
wasnt arguing the issue, just stating that if he was correct, which it turns out he isnt, about
/if $char(speed)<=0.2 /press Num_Lock | Makes the char move foward if standing still
actually making the char move forward, then something is wrong, one way or another. Though he does have a point about it being in lots of macros :?