Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
eironia
Beginner


Joined: 24 Jul 2006
Posts: 11

PostPosted: Sat Jul 29, 2006 12:49 am   

Guage goof?
 
Ok, I tried out a simple (I hoped) hp guage. Now I have a pretty silver bar that says hp and doesn't change. I'm still struggling with variables, and how Zmud knows what they are...here's what I have:

#TRIGGER {~[HP:(%d)~%~] ~[ME:(%d)~%~] ~[PE:(%d)~%~]} {#VAR hp %1}

and then

#GAUGE hp "hp" @hp 100 30 "" "blue" "red"

This is a sample prompt:

[HP: 99%] [ME:100%] [PE: 23%]

Did I goof? I'm rather stupid about all this I'm afraid.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jul 29, 2006 3:11 am   
 
Yep. From what I can see you are missing a space between HP: and 99. This is causing your trigger to not fire, and therefore none of the variables get updated (well, @hp at least). Since it looks like maybe your mud is intentionally not sending a space between : and 100, a quick fix would be to change : to {:|: } to properly match both cases.

Beyond this, and the obvious inclusion of your other variables, your trigger, variable usage, etc seems perfect.
_________________
EDIT: I didn't like my old signature
Reply with quote
eironia
Beginner


Joined: 24 Jul 2006
Posts: 11

PostPosted: Sat Jul 29, 2006 4:10 am   
 
Brilliant! Works like a dream; my thanks.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Sat Jul 29, 2006 2:45 pm   
 
I am going to further guess that the mud will have 2 spaces when you get down to single digits. I would suggest using the fixed width pattern &3 see the help on pattern matching for more information.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net