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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Ambelghan
Novice


Joined: 04 Apr 2010
Posts: 49

PostPosted: Tue Aug 03, 2010 7:22 am   

%numword() error in 3.22
 
I am on DragonRealms. I have a GSL trigger for my left and right hands.
Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger type="GSL" priority="550" copy="yes">
    <pattern>l</pattern>
    <value>lfhand = %gsl(l)
</value>
  </trigger>
</cmud>


So when the left hand gsl updates my @lfhand variable should update as well. I have this button:

Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <button name="LfHandButton" autosize="false" width="170" height="23" autopos="false" left="270" top="22" toolbar="2" color="black" textcolor="yellow" priority="187" copy="yes">
    <caption>@lfhand</caption>
    <value>#SWITCH (@lfhand = "Empty")
{
  remove my shield
} (%word(@lfhand,%numwords(@lfhand)) = "shield")
{
wear my shield
} (@lfhand != "Empty")  {stow my %word(@lfhand,%numwords(@lfhand))}</value>
  </button>
</cmud>


Basically, if the @lfhand variable is "Empty" it takes my shield off my character's shoulder or arm and places it in my character's left hand, if my character's hand has an item ending in the word "shield," my character will wear it, if there is something else that does not end in the word "shield," it will be placed in a container. Before, %word(@lfhand,%numwords(@lfhand)), was actually just returning the last word in the string, but 3.22a is not returning anything and "an alabaster white shield," is generating a %numword(@lfhand) of 13 words, which is clearly is not. I observed the l gsl in 3.22a and 2.37, both have the same weird spacing between words, but only 3.22a is paying attention to it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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