what the hell..

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

nahsalot
orc pawn
orc pawn
Posts: 27
Joined: Fri Apr 02, 2004 11:38 am

what the hell..

Post by nahsalot » Thu Apr 15, 2004 9:51 am

| test.mac
|
| Testing MQ2Data!
|
Sub Main
/newif ${Me.Casting}==NULL {
/echo I'm not casting
} else /newif ${Me.Casting}!=NULL {
/echo I am casting
} else {
/echo this is broken
}
/endmac

if you are casting "this is broken" is always returned.

changing it to ${Bool[${Me.Casting}]} works but still! what the!

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 » Thu Apr 15, 2004 11:27 am

No shit asswipe.
The reason is ${Me.Casting} is not numeric:

(spawn)
...spell Casting: Spell, if currently casting
(spell)
- To String: Same as Name

So if you're casting "Spirit of Wolf", /newif sees this:

Code: Select all

/newif Spirit of Wolf==NULL {
/echo I'm not casting
} else /newif Spirit of Wolf!=NULL {
/echo I am casting, and I'm also dumb for doing an if on the false branch that checks if the false branch should be executed!
}
else
{
/echo this is broken
}
Note that /newif Spirit of Wolf==NULL isnt a valid numeric comparison... how do you quantify Spirit of Wolf? Use /newif ${Me.Casting.ID}

The reason it seems broken is because /newif currently doesnt give an error message or stop your macro on parsing errors. I'll make it do so again.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

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 » Thu Apr 15, 2004 11:33 am

/newif in the future will end the macro, and will give a message like this:

Failed to parse /newif condition 'Spirit of Wolf==NULL', non-numeric encountered
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0