False posative

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Virtuoso65
a hill giant
a hill giant
Posts: 150
Joined: Wed Oct 15, 2003 2:29 pm

False posative

Post by Virtuoso65 » Fri Apr 23, 2004 12:35 am

In trying to convert my fishing mac I ran into this error. Reguardless of of an item actually being on the cursor this comes up. This is true for both Equal and NotEqual.

Always returns true, works.

Code: Select all

Sub Main
   /if (!${Cursor.NotEqual[NULL]}) {
   /echo works
   } else /echo doesnt work
/return
Always Returns false, doesnt work.

Code: Select all

Sub Main
   /if (${Cursor.NotEqual[NULL]}) {
   /echo works
   } else /echo doesnt work
/return

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Fri Apr 23, 2004 12:44 am

:roll:

get MQ2-20040421b.zip

If the top of your changes.txt does not say this
"21 Apr 2004 by Lax:
- Fixed if/newif"

then you do not have the latest zip

enjoy
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

devNull
a ghoul
a ghoul
Posts: 121
Joined: Sat Mar 06, 2004 3:57 am

Post by devNull » Fri Apr 23, 2004 12:46 am

Use the following to check if something is or isn't on the cursor:

Code: Select all

/if ( ${Cursor.ID} ) /echo something on cursor
/if ( !${Cursor.ID} ) /echo nothing on cursor

Lax, since I saw your post after I posted,

Code: Select all

 ${Cursor.NotEqual[NULL]}
${Cursor.Name.NotEqual[NULL]}
${Cursor.Equal[NULL]}
${Cursor.Name.Equal[NULL]}
all return NULL. So,

Code: Select all

/if ( !NULL )
always is TRUE and

Code: Select all

/if ( NULL )
always is FALSE which was the original posters problem. Is this not by design?
Last edited by devNull on Fri Apr 23, 2004 12:54 am, edited 2 times in total.

Virtuoso65
a hill giant
a hill giant
Posts: 150
Joined: Wed Oct 15, 2003 2:29 pm

Post by Virtuoso65 » Fri Apr 23, 2004 12:49 am

Bah you put up another zip? damn the man I say.

Ok lax thanks.