cmds problem with output

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

boredom
a lesser mummy
a lesser mummy
Posts: 49
Joined: Thu Jun 19, 2003 3:45 pm

cmds problem with output

Post by boredom » Thu Aug 14, 2003 6:17 pm

having a problem with the cmds command on my cleric, though all the commands still work, and the variable is set correctly (seen with /echos). The /tell I get from the bot when using the command is:
BOT tells you, 'Commands: afk, accept, reject, invite, mana, follow stop, evac, moveto, sit, stand, sn, camp, duck, run, say, 0'
my cleric bot is at: http://macroquest2.com/phpBB2/viewtopic ... 8315#18315

/Bored

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Post by Shin Noir » Fri Aug 15, 2003 7:20 am

Don't have a cleric to personally test this on but..

When you do this code

Code: Select all

/varset CmdList "$a(1,0), $a(1,1), $a(1,2), $a(1,3), $a(1,4), $a(1,5) $a(1,6), 

$a(1,7), $a(1,8), $a(1,9), $a(1,10), $a(1,11), $a(1,12), $a(1,13), $a(1,14), $a(1,15), 

$a(1,16), $a(1,17), $a(1,18), $a(1,19), $a(1,20), $a(1,21), $a(1,22), $a(1,23), $a(1,24), 

$a(1,25), $a(1,26), $a(1,27), $a(1,28), $a(1,29), $a(1,30), $a(1,31), $a(1,32), $a(1,33), 

$a(1,34),  $a(1,35), $a(1,36), $a(1,37), $a(1,38), $a(1,39), $a(1,40), $a(1,41), $a(1,42), 

$a(1,43), $a(1,44), $a(1,45), $a(1,46), $a(1,47), $a(1,48), $a(1,49), $a(1,50)" 
Tweak it to:

Code: Select all

/for v74 0 to 50
 /if $a(1,$v74)!=0 /varset CmdList "$Cmdlist $a(1,$v74), "
/next v74
 /if $a(1,50)!=0 /varset CmdList "$Cmdlist $a(1,50)"
Then if a variable in the array has no value it won't display it as 0... Least that may be your problem.

boredom
a lesser mummy
a lesser mummy
Posts: 49
Joined: Thu Jun 19, 2003 3:45 pm

shortening = breaking

Post by boredom » Sat Aug 16, 2003 1:49 pm

This is what started my problem with the output, I changed that long varset to this:

Code: Select all

	/varset CmdArraySize $int($return) 

	/for Counter 0 to $CmdArraySize
		/varset CmdList "$CmdList $a(1,$Counter),"
	/next Counter
and now when I changed it back, it's still broken. my problem isn't that it outputs a 0, it's that it outputs a 0 and does not list any other commands. Sit is not even at the half way point through the commands.

/Bored