bad variable in /var function message

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

bad variable in /var function message

Post by JimJohnson » Sat Oct 11, 2003 6:09 am

everytime I try and run my cleric macro with /macro cleric 0 <how I did it before 10oct>

Code: Select all

#define GroupMember v93 
#define GroupMax v90 
#define ChatCommand p2 
#define XLOC v52 
#define YLOC v53 
#define $GroupClass $spawn($group($GroupMember),class) 

#include SpellSub.mac 
#include routines.mac 
#chat tell 
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel" 
#Event ClarityGone "Your mind returns to normal." 
#Event InvisGone "You feel yourself starting to appear" 
#Event RootGone "Your Immobilize spell has worn off." 
#Event FollowOff "You are no longer auto-following " 

Sub Main 
/varset v69 $p0 
:chkevent 
/doevents 
| *** AutoHeal *** 

/varcalc GroupMax $group(count)-1 
/for GroupMember 0 to $GroupMax 
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember 

/if "$GroupClass"=="Warrior" /goto :Tankheal 
/if "$GroupClass"=="Paladin" /goto :Tankheal 
/if "$GroupClass"=="Shadow Knight" /goto :Tankheal 
/if "$GroupClass"=="Monk" /goto :Meleheal 
/if "$GroupClass"=="Ranger" /goto :Tankheal 
/if "$GroupClass"=="Rogue" /goto :Meleheal 
/if "$GroupClass"=="Bard" /goto :Meleheal 
/goto :CasterHeal 

:Tankheal 
/if n $spawn($group($GroupMember),hp,pct)<71 { 
/if n $group($GroupMember)==$char(id) /press F1 
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
/if n $target(distance)>100 { 
/tell $p0 %T is too far away. 
/delay 30
/press esc 
/goto :nextmember 
} 
/stand 
/g Complete Heal >> %T 
/call SpellSub 1 100 
/press esc 
} 
/goto :nextmember 

:Meleheal 
/if n $spawn($group($GroupMember),hp,pct)<71 { 
/if n $group($GroupMember)==$char(id) /press F1 
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
/if n $target(distance)>100 { 
/tell $p0 %T is too far away. 
/pause 30 
/sit
/press esc 
/goto :nextmember 
} 
/stand 
/g SR INC %T 
/call SpellSub 2 50 
/pause 20 
/press esc 
} 
/goto :nextmember 

:Casterheal 
/if n $spawn($group($GroupMember),hp,pct)<71 { 
/if n $group($GroupMember)==$char(id) /press F1 
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
/if n $target(distance)>100 { 
/tell $p0 %T is too far away. 
/delay 30 
/press esc 
/goto :nextmember 
} 
/stand 
/g SR INC %t 
/call SpellSub 2 50 
/sit 
/press esc 
} 
/goto :nextmember 

:nextmember 
} 
/next GroupMember 
/goto :chkevent 
/return 
i get the follow error

Ending Macro: Bad Variable in /var function
cleric.mac@19(main): /varset v69 $p0
cleared the following: Timed Vars Arrays
The current macro has ended

Guest

Post by Guest » Sat Oct 11, 2003 6:46 am

@Param0

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Sat Oct 11, 2003 7:15 am

what did you mean @Param0?

Guest

Post by Guest » Sat Oct 11, 2003 7:28 am


JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Sat Oct 11, 2003 9:45 am

thanks using the link you posted but i suck with coding so taking forever =p