info bar displaying nil value

Posted by Shady Stranger on Sat 23 Jan 2016 05:50 AM — 3 posts, 14,720 views.

USA #0
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.
Amended on Sat 23 Jan 2016 05:55 AM by Shady Stranger
Australia Forum Administrator #1
Template:faq=32
Please read the MUSHclient FAQ - point 32.
USA #2
-- Establish wildcard values
HP, MaxHP, ST, MaxST, Carry, MaxCarry, M, S = %1, %2, %3, %4, %5, %6, %7, "%8"


That works. Thank you.