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
Shylmysten
Wanderer


Joined: 18 Sep 2001
Posts: 93
Location: USA

PostPosted: Fri Dec 20, 2002 11:03 am   

Trouble with script conversion from 6.16 to 6.40
 
Hi Im having a nasty problem with one of my script. I used to be able to type
vset 99999 heatlh and it would be added to the variable @vhealth in a list with a 1 next to it to show that it was full a 0 to show that it was empty. So the variable ended up looking like this
vhealth= 4444|1|99999|1

However now when I type in the vset command it is adding it to the variable list it looks like this
vhealth= 4444|1|(99999|1)

here is the script to that alias
 

#ALIAS vset {#IF (%isnumber(%1)) {#IF (%ismember(%insert(v,%if(%2=empty,%3,%2),1),@vials)) {#IF (%2=empty) {#IF (%ismember(%1,@{v%3})) {#VAR v%3 %delitem(%1|%item(@{v%3},%ismember(%1,@{v%3})+1),@{v%3})};#VAR v%3 %additem("%1|0",@{v%3})} {#IF (%ismember(%1,@{v%2})) {#VAR v%2 %delitem(%1|%item(@{v%2},%ismember(%1,@{v%2})+1),@{v%2})};#VAR v%2 %additem("%1|1",@{v%2});#IF (%ismember(0,@{v%2})) {#WHILE (%ismember(0,@{v%2}) < %ismember(%1,@{v%2})) {#VAR v%2 %additem(%item(@{v%2},%ismember(0,@{v%2})-1)|0,@{v%2});#VAR v%2 %delitem(%item(@{v%2},%ismember(0,@{v%2})-1)|0,@{v%2})}}};#EC %1 set to %if(%2=empty,%upper(%3) (empty),%upper(%2)).} {#EC %if(%if(%2=empty,%3,%2),%upper(%if(%2=empty,%3,%2)) is not a valid vial type.,Syntax: vset #vial (empty) type)}} {#EC Syntax: vset #vial (empty) type}}
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Dec 20, 2002 12:18 pm   
 
You code is adding a list to a list. zMud now supports nested lists and keeps them seperate in that fashion. Simply change your script to add each item 1 at a time.
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