|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sun Sep 16, 2007 2:29 am
two word records |
Please help
I have a CMUD variable in Achaea named "@parry_hits" in a defense package I bought with keys that show limbs, head, and torso and the number of hits against each. Since I play a Monk I do not use parry so I want to simply show the number of hits to each body part using this variable. I've made a set of buttons which are arranged to form the shape of a human and I can move my guard around by pressing the buttons corresponding to each body part. I am using the syntax "@parry_hits.head" and "@parry_hits.torso" as the button names so the number of hits sored on the head and torso shows up very well. My problem is this. The limb keys are two words so for example the button named "@parry_hits.right arm" has a value of "arm" instead of the numeric value I want. Is there a good way to force this to read the numeric value of the two word keys? I'm sure that I'm missing something very simple but I've tried about everything I can think of to get it to work right. I would be grateful for any insight you can give. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Sep 16, 2007 2:41 am |
Use %db(@parry_hits,right arm) instead. Probably won't work as a button caption, however.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sun Sep 16, 2007 3:06 am |
Any suggestions on how to recover this information to the button caption? I thought maybe adding a statement triggered off the command promt to set another variable equal to %db(@parry_hits,right arm) might work and then use the new variable as the button caption. I hesitate to do this because I will need one for each limb and could seriously bog down performance. I hope there is a better way.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Sep 16, 2007 8:58 am |
There's no problem using %db in a button caption. You may need to surround your two-word string in quotes ".
|
|
|
|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sun Sep 16, 2007 12:42 pm |
Thanks! It worked using the quotes.
|
|
|
|
|
|