![](templates/Classic/images/spacer.gif) |
Andur Newbie
Joined: 31 Dec 2016 Posts: 3
|
Posted: Fri Jan 07, 2022 1:41 pm
variable question |
I have a var 'strike-number'
It reads the mud text correctly and sets the var correctly.
But when i try to display the var in status windiw, or just call it up with #show @strike-number command, i get '-number'
Can anyone elaborate?
And the MUD displays line: Your strike-number is: 4
Your (%w) is: (%d)
#var %1 %2 |
|
|
![](templates/Classic/images/spacer.gif) |
hpoonis2010 Adept
![](images/avatars/1873888255ff6db71d8987.jpg)
Joined: 18 Jun 2019 Posts: 279
|
Posted: Fri Jan 07, 2022 6:05 pm |
I don't think %w will do it as %w is word and you may have two words, or even word(minus)word. Try
Your (*) is: (%d)
#SH %trim(%1) %2
Alternatively, call your variable @strikeNumber |
|
|
![](templates/Classic/images/spacer.gif) |
Danlo Magician
![](images/avatars/1578549964100daf016b9b.jpg)
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Sun Jan 23, 2022 7:36 am |
#show @{strike-number}
Or as Hpoonis says, #Trigger {Your strike-number is: (%d)} {#Var Strikenumber %1} |
|
|
![](templates/Classic/images/spacer.gif) |
Gintonic Beginner
Joined: 04 May 2018 Posts: 12
|
Posted: Mon Jan 24, 2022 4:35 am |
%x would match the non-white space, so it eliminates the need of training.
Your (%x) is: (%d)
Should work just fine |
|
|
![](templates/Classic/images/spacer.gif) |
Gintonic Beginner
Joined: 04 May 2018 Posts: 12
|
Posted: Mon Jan 24, 2022 4:35 am |
*triming
|
|
|
![](templates/Classic/images/spacer.gif) |
Danlo Magician
![](images/avatars/1578549964100daf016b9b.jpg)
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Mon Jan 24, 2022 11:45 pm |
Gintonic wrote: |
%x would match the non-white space, so it eliminates the need of training.
Your (%x) is: (%d)
Should work just fine |
The issue isn't writing to the variable. The issue is when he is trying to access the variable,
the - creates an issue, so he needs to use {} to specify the variable name to include -. This is
a carry-over from zMUD and can be found in the zmud help files. |
|
|
![](templates/Classic/images/spacer.gif) |
|
|