Declare error

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

kurkey
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sun Oct 10, 2004 1:57 pm

Declare error

Post by kurkey » Wed Apr 06, 2005 1:14 pm

I added this to Rogue helper v6.0 (BTW excellent macro Jerle)
The first time I die it works perfect, but the second and third time it gives me /declare t int local already in use error, do I just have to change the outer to local or global for that to stop?
I updated the wiki with info http://www.macroquest2.com/wiki/index.php/Macro_Error

Sub Event_Dead
/declare t int local 0
/declare loottotal int outer
/declare lootslot int outer
/declare lootleft int outer 0

/if (!${Defined[Param0]}) {
/echo Defaulting to leaving ${lootleft} item/s on corpse
} else {
/varset lootleft ${Param0}
}
/echo Wait4rez.mac activated. Now consenting guild, raid, and group.
| --------------
| -- Consents --
| --------------
/consent guild
/delay 30
/consent raid
/delay 30
/consent group
/echo Awaiting rez: will auto-accept, then loot leaving ${lootleft} item/s on corpse
| ---------------------
| -- Auto-accept Rez --
| ---------------------
:waitforrez
/if (!${Window[ConfirmationDialogBox].Open}) {
/delay 1s ${Window[ConfirmationDialogBox].Open}
/goto :waitforrez
}
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
| ----------------------------------------------
| -- Wait until fully zoned in before looting --
| ----------------------------------------------
:zonein
/delay 5
/target mycorpse
/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein
/if (${Target.CleanName.Equal[${Me}'s corpse]}) {
/delay 3s
/call Loot
} else /goto :zonein
/return

| ---------------------
| -- Loot Corpse Sub --
| ---------------------
Sub Loot
| -----------------------
| -- Pull corpse close --
| -----------------------
:corpsepull
/target mycorpse
/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) {
/echo No corpse in this zone
/return
}
/delay 3s
/corpse
/delay 1s ${Target.Distance}<20
/if (${Target.Distance}>20) {
/echo Corpse is too far away
/return
}
| ---------------------
| -- Open the corpse --
| ---------------------
/if (${Target.CleanName.Equal[${Me}'s corpse]}) {
/loot
} else {
/echo where did my corpse go?
/return
}
/delay 5s ${Me.State.Equal[BIND]}
/if (${Me.State.NotEqual[BIND]}) /goto :corpsepull
/varset loottotal 0
| -----------------
| -- Count items --
| -----------------
:LootLag
/if (${loottotal}!=${Corpse.Items}) {
/varset loottotal ${Corpse.Items}
/delay 1s
/goto :LootLag
}
/if (${loottotal}<=${lootleft}) {
/echo Looting aborted. Error in number items to be left on corpse.
/notify LootWnd DoneButton leftmouseup
/return
}
/varset loottotal ${Math.Calc[${Corpse.Items}-${lootleft}]}
| ---------------------
| -- Loot the corpse --
| ---------------------
/echo Looting all but ${lootleft} item(s)
/for lootslot 1 to ${loottotal}
:LootItem
/itemnotify loot${lootslot} rightmouseup
/delay 5 !${Corpse.Item[${lootslot}].ID}
/if (!${Corpse.Item[${lootslot}].ID}) {
/next lootslot
} else /goto :LootItem
| -----------------
| -- Doublecheck --
| -----------------
/if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag
/notify LootWnd DoneButton leftmouseup
/echo Done looting. ${lootleft} Item(s) left on your corpse.
/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 » Wed Apr 06, 2005 2:47 pm

I removed the wiki edit because it used words like "I think" and simply showed you were unsure of what you were saying and didn't really want to take a shot at answering. Sound convincing even if you dont know.
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 » Wed Apr 06, 2005 3:02 pm

Note: To help with this if you're unsure I added something to the wiki (which is explained on the [[Help Forums]] instructions page). Add {{Review|Your Username}} such as {{Review|Lax}} or {{Review|kurkey}} to the end of your edit, and it will be visibly marked for review.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 1:58 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:00 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:01 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:02 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:03 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:04 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:05 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:06 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:07 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:09 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:10 am


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Declare error

Post by xyilla » Tue May 06, 2025 2:11 am