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


Joined: 06 Apr 2004
Posts: 173

PostPosted: Tue Nov 15, 2005 11:06 pm   

#FORALL help
 
Im looking to be able to do something like:

#FORALL @queue {%i}
queue = ""

but it seems that if my queue has a lot of elements that sometimes more MUD text is received before the queue operation has finished.

If I write to the queue as a result of receiving new text the forall quits, and I don't get half the things I need performed done.

Is there a way to force #FORALL to complete before receiving new text from the MUD? or is there another funtion that does a similar operation?

basically it looks as though all of the #LOOP commands act the same way, I think there is some sort of output delay on them... not what I want.

Any help would be appreciated
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Tue Nov 15, 2005 11:20 pm   
 
tried copying the queue to another var and letting it run from there?
this way the original queue can accumulate and not interfere.
_________________
http://www.Aardwolf.com
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Tue Nov 15, 2005 11:24 pm   forall help
 
I would rather have it do what I want, then have to make a workaround.

Also, I would prefer to have a solution using zuggs language, but if someone can do this in javascript or something else that would be ok...

(I dont know if I would know how to make a javascript one by myself however.)
Reply with quote
shalimar
GURU


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

PostPosted: Tue Nov 15, 2005 11:37 pm   
 
#PRIORITY {#while (!%null(@queue)) {%pop(@queue)}}

would this work?
_________________
Discord: Shalimarwildcat
Reply with quote
gmueller
Apprentice


Joined: 06 Apr 2004
Posts: 173

PostPosted: Wed Nov 16, 2005 1:15 am   
 
Oh my gosh, yes, thank you I didn't know about the Priority command! I'll look to see if it will work, but that shows great promise!
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