 |
eironia Beginner
Joined: 24 Jul 2006 Posts: 11
|
Posted: 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. |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
 |
eironia Beginner
Joined: 24 Jul 2006 Posts: 11
|
Posted: Sat Jul 29, 2006 4:10 am |
Brilliant! Works like a dream; my thanks.
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: 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 |
|
|
 |
|
|