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


Joined: 17 Apr 2004
Posts: 18

PostPosted: Sun Jul 16, 2006 8:38 am   

pls help me
 
how do using %roomlink+%roomportal
Obtains
ls=%walk(xxx)
tabulates
roomnum?
thanks

#FORALL @ls {
#add ls2 1
#IF (%RoomLink( %item( @ls1, @ls2), %i)<>%Null) {#ADDITEM ls1 %RoomLink( %item( @ls1, @ls2), %i)} {#ADDITEM ls1 %DelnItem( %RoomPortal( %item( @ls1, @ls2)), 1)}

why noit?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sun Jul 16, 2006 5:54 pm   
 
%walk actually returns a speed walk string like so (.20se2sw). Since there is no delimiter in the commands, there is nothing to loop on and thus the loop only executes once.

If you want to loop on the commands, you have to break up the string, or expand it with %pathexpand
_________________
Asati di tempari!
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