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
Dfgaskins
Newbie


Joined: 26 Mar 2004
Posts: 5

PostPosted: Mon Mar 29, 2004 6:22 am   

#pcol and 6.66
 
I am working on ver 6.65 and my triggers work fine.. but a friend on 6.66 has same ones and it doesn't

this is what i have

pattern
(%d)/(%d)%****,%s(%d)/(%d)%smove,%s(%d)/(%d)%s{psp|man}%s(@vtarget)
command
#pcol cyan %x7

i also have these alias.. to add and del variables from the
variable string @vtarget

#alias addvit {#VAR vtarget %additem( %proper( %1), @vtarget;#SA %1 ADDED TO VIT LIST}

#alias delvit {#var vtarget %delitem( %proper( %1), @vtarget);#SA %1 REMOVED FROM VIT LIST}

@vtarget represents a name when you type group..

normally if you don't have variables added to @vtarget, when i type
group whoevers name is here will show up green.. when i add them to the @varable with addvit alias they then turn cyan.. this is using 6.65a

well on 6.66 when you remove all variables from @vtarget... all them names are not green.. they are all cyan.. untilll you add a variable
into @vtarget.. then the trigger appears to work correctly.. but once all is cleared from variable.. all names are cyan.. and they are sposed to be default from mud witch is green..

is there something different with 6.66 were maybe a default variable has to be in the @vtarget at all times in order for the trigger to work correctly? or is there a fix?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Mar 29, 2004 1:16 pm   
 
First, you should both upgrade to the latest public version.

During those versions you are using the trigger pattern parser was undergoing some changes. However it works in the latest public version is the correct way, though.

Next, keep in mind that for a line that is:
Kjata is here.

any of these patterns will match:
Kjata
Kjata is
Kjata is here.

In your case, if the list is empty, since the pattern does not have a $ after the stringlist in the pattern to make it match the end of the line, the pattern would still match. More specifically, this has to do with how a null stringlist item is handled in the pattern (which was changed for version 6.66).

Also, stringlist in patterns should be enclosed by braces.

So, what you should try is adding a $ at then end of the pattern. However, more recommended is upgrading to the latest version, especially since beta versions don't work forever.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 29, 2004 6:41 pm   
 
You should also consider changing your pattern. %* is seldom needed (never in the current version), and *** matches exactly the same patterns as *.

* matches any character string, of any length, including zero. Multiples *'s also match any character string, of any length, including zero. Since there's no difference at all between one * and multiple *'s, there is never any reason to use more than one consecutively.

(%d)/(%d)*,%s(%d)/(%d)%smove,%s(%d)/(%d)%s{psp|man}%s(@vtarget)

#ADDITEM and #DELITEM might be a little easier to use, since you aren't likely to want duplicates in this variable.
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