Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ info bar displaying nil value

info bar displaying nil value

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


Posted by Shady Stranger   USA  (45 posts)  Bio
Date Sat 23 Jan 2016 05:50 AM (UTC)

Amended on Sat 23 Jan 2016 05:55 AM (UTC) by Shady Stranger

Message
For some reason, everything works on the info bar trigger other than status.

It displays on the info bar like this:
HP: ###/###  ST: ###/###  Carry: ###/###  Money: ###  Status: nil


When the prompt received from the game looks like this:
HP: ###/### ST: ###/### Carry: ###/### Money: ### Status: Standing


I have tried many things but I can't seem to get it to display the word. It always displays "nil". Numbers seem to work just fine (actual numbers replaced with "#").


<triggers>
  <trigger
   enabled="y"
   group="infobar"
   keep_evaluating="y"
   match="^HP\: (.*?)\/(.*?) ST\: (.*?)\/(.*?) Carry\: (.*?)\/(.*?) M\: (.*?) Status\: (.*?)$"
   omit_from_log="y"
   omit_from_output="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>-- Copy/paste next line to MUD
-- prompt HP: %h/%H ST: %m/%M Carry: %w/%W M: %g Status: %I%B%B%E%B

-- Establish wildcard values
HP, MaxHP, ST, MaxST, Carry, MaxCarry, M, S = %1, %2, %3, %4, %5, %6, %7, %8

-- Set up for Info bar font and color.
ShowInfoBar (Visible)
InfoClear ()
InfoBackground ("black")
InfoFont ("FixedSys", 9, 0)

-- Health
InfoColour ("red")
Info ("HP: ", HP, "/", MaxHP)

-- Stamina
InfoColour ("blue")
Info ("   ST: ", ST, "/", MaxST)

-- Carry
InfoColour ("magenta")
Info ("   Carry: ", Carry, "/", MaxCarry)

-- Money
InfoColour ("gold")
Info ("   Money: ", M)

-- Status
InfoColour ("white")
Info ("   Status: ", S)</send>
  </trigger>
</triggers>


Edit: I can never seem to get the quote/code boxes right on the first try.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 23 Jan 2016 09:00 PM (UTC)
Message
Template:faq=32 Please read the MUSHclient FAQ - point 32.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shady Stranger   USA  (45 posts)  Bio
Date Reply #2 on Sat 23 Jan 2016 09:07 PM (UTC)
Message
-- Establish wildcard values
HP, MaxHP, ST, MaxST, Carry, MaxCarry, M, S = %1, %2, %3, %4, %5, %6, %7, "%8"


That works. Thank you.
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.


10,846 views.

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

Go to topic:           Search the forum


[Go to top] top

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