/declare failed

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

Moderator: MacroQuest Developers

User avatar
Pax
a lesser mummy
a lesser mummy
Posts: 52
Joined: Fri Dec 19, 2003 11:04 am
Location: Denmark

/declare failed

Post by Pax » Thu Apr 29, 2004 12:59 pm

Code: Select all

Sub Cast(SpellName,Item)
   /if (!${Defined[CastGiveUpTime]}) /declare CastGiveUpTime timer
   /if (!${Defined${Item}}) /declare Item Local
i get the error /declare 'Item' failed. Name already in use.
i havent declared if before and there is no global /declares anywhere, i can for the life of me not see whats wrong :(
//Fuck waiting for us to cleanly exit... we're being unloaded!

iluvseq
Clueless Mudslinger
Posts: 269
Joined: Mon Apr 14, 2003 10:05 am

Re: /declare failed

Post by iluvseq » Thu Apr 29, 2004 1:07 pm

${Item} is a top level object. You won't be able to have a user variable ${Item} (or ${Spawn} or ${Me} etc....)

Check out: http://macroquest2.com/phpBB2/viewtopic.php?t=6022

Anything listed as a Top Level Object is "reserved" and unavailable as a user variable.