Help with displaying stats using world.info

Posted by Haj on Sat 04 May 2013 06:07 PM — 3 posts, 14,073 views.

#0
I started a similar thread earlier for modifying a plugin which went nowhere. Building my own works except I cannot get it to display whether I am evil/good etc.. This is a simple trigger I created in mush client pasted below, under that is the error I am receiving and I don't understand. The problem is the %6, but I do not know what I should put there instead.

Triggers on: HP: 2969 (2969) GP: 447 (447) XP: 1448113 A: good B: 11%





^HP\: (.*?) \((.*?)\) GP\: (.*?) \((.*?)\) XP\: (.*?) A\: (.*?) B\: (.*?)\%$


sFont="Arial"
world.InfoClear()
world.Info("HP: " .. %1 .. " \(" .. %2 .. "\) ")
world.Info(" GP: " .. %3 .. " \(" .. %4 .. "\) ")
world.Info(" XP: " .. %5)
world.Info(" A:" .. %6)
world.Info(" B: " .. %7 .."\%")



[string "Trigger: "]:7: attempt to concatenate global 'good' (a nil value)
stack traceback:
[string "Trigger: "]:7: in main chunk
Amended on Sat 04 May 2013 07:11 PM by Haj
USA #1
MUSHclient is trying to display the value of the variable good ...

Try the following...

world.Info(" A: %6")


Amended on Sat 04 May 2013 07:54 PM by hogarius
#2
That worked perfectly, thanks for the help!