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
ToyMage
Apprentice


Joined: 01 Sep 2005
Posts: 120

PostPosted: Tue Dec 27, 2005 5:53 pm   

%DELITEM Not working
 
I don't know why it is not working. The trigger is suppose to capture the spells active and delete it from SpellList variable. The pharse is triggering but it is not deleting it from @SpellList.

Please advice.

------------------------

1. Variable

#VAR SpellList detect invisible|detect hidden

2. Trigger

Pattern:

^|~ * ~ |

#IF %ISMEMBER( %1, @SpellList) {SpellList=%DELITEM( %1, @SpellList)}

Example:

| detect invisible |
| detect hidden |
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Dec 27, 2005 7:11 pm   
 
You have to user () to capture something to %1 etc etc


Pattern:

^|~ (*) ~ |
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4689
Location: Pensacola, FL, USA

PostPosted: Tue Dec 27, 2005 10:58 pm   
 
#VAR SpellList detect invisible|detect hidden

looks to me like your making a variable:

Spellist

with a value of:

detect

a default value of:

"invisable|destect"

in a class:

hidden

you need the {} surrounding a multi word variable, like so:

#VAR SpellList {detect invisible|detect hidden}
_________________
Discord: Shalimarwildcat
Reply with quote
ToyMage
Apprentice


Joined: 01 Sep 2005
Posts: 120

PostPosted: Wed Dec 28, 2005 4:19 am   
 
haha,

silly me, both of your comments helped me.

Thanks.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Dec 28, 2005 6:29 am   
 
LOL I don't believe I missed that one Thanks Shalimar
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Dec 28, 2005 9:39 am   
 
And 1 more...
#IF (%ISMEMBER( "%1", @SpellList)) {SpellList=%DELITEM( "%1", @SpellList)}

Personally I would shorten this right down to
#DELITEM SpellList {%1}
as the way you have it now it has to search the list for the item twice.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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