[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Help with displaying stats using world.info

Help with displaying stats using world.info

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Haj   (3 posts)  [Biography] bio
Date Sat 04 May 2013 06:07 PM (UTC)

Amended on Sat 04 May 2013 07:11 PM (UTC) by Haj

Message
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
[Go to top] top

Posted by hogarius   USA  (22 posts)  [Biography] bio
Date Reply #1 on Sat 04 May 2013 07:50 PM (UTC)

Amended on Sat 04 May 2013 07:54 PM (UTC) by hogarius

Message
MUSHclient is trying to display the value of the variable good ...

Try the following...

world.Info(" A: %6")


[Go to top] top

Posted by Haj   (3 posts)  [Biography] bio
Date Reply #2 on Sat 04 May 2013 08:07 PM (UTC)
Message
That worked perfectly, thanks for the help!
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,559 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]