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
dysonsphere
Beginner


Joined: 11 Dec 2001
Posts: 16
Location: Canada

PostPosted: Thu Apr 11, 2002 4:19 pm   

problem with %replace
 
Ok basically what I want to do is as follows:

snipped to show the problem part

#IF (@charmie1fullname = %null) {
#VARIABLE charmie1fullname @mobcalled
#ECHO setting charmie1fullname to @charmie1fullname
}
#VARIABLE mobname %replace( @mobcalled , " ", "|")
#ECHO mobshortnames @mobname
#FORALL @makemobshort {#IF (%ismember( %i, @mobname)) {#DELITEM mobname %i}}
#IF (@charmie1 = %null) {
#VARIABLE charmie1 %pop( @mobname)
#ECHO charmie1 is @charmie1
}

this breaksdown at setting the charmi1 var
I have this script and all its variables in a seperate folder in the triggers list and when I check the triggers I get sometimes 2 -3 copies of the variable names

this use to work in prior version of zmud til I got the new version 6.26a any suggestions would be appriciated
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Apr 11, 2002 4:29 pm   
 
If it worked in prior versions and stopped working when you got a new BETA version, it's most likely a beta problem which should be reported on the beta forum.

I'm unable to find a %pop function in 6.16.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
dysonsphere
Beginner


Joined: 11 Dec 2001
Posts: 16
Location: Canada

PostPosted: Thu Apr 11, 2002 4:30 pm   
 
also I guess I sould mention the following

here is what I am trying to do:

when I call a mob I have a trigger that captures the mob name than I parse the mob name before I set the variable
the parse list is just common words in long descriptions ie:

a rat appears out of nowhere

I grab the "a rat" strip off the "a"
but my variable ends up being a blank
Reply with quote
dysonsphere
Beginner


Joined: 11 Dec 2001
Posts: 16
Location: Canada

PostPosted: Thu Apr 11, 2002 4:32 pm   
 
[quote]
If it worked in prior versions and stopped working when you got a new BETA version, it's most likely a beta problem which should be reported on the beta forum.

I'm unable to find a %pop function in 6.16.

I think the %pop came out in 6.25 or what ever the version was right after 6.16 and it works see my other post
Reply with quote
dysonsphere
Beginner


Joined: 11 Dec 2001
Posts: 16
Location: Canada

PostPosted: Thu Apr 11, 2002 5:19 pm   
 
[quote]
#IF (@charmie1 = %null) {
#VARIABLE charmie1 %pop( @mobname)
#ECHO charmie1 is @charmie1
}
[quote]

found the problem doh I feel stupid I was using the literal var name for the %pop
I got it working
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Apr 11, 2002 5:33 pm   
 
6.25 is also a beta version. I mentioned 6.16 because it's the latest public version. Anyway, I'm glad you solved your problem.

LightBulb
All scripts untested unless otherwise noted
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