|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: 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 |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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. |
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: 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.) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Tue Nov 15, 2005 11:37 pm |
#PRIORITY {#while (!%null(@queue)) {%pop(@queue)}}
would this work? |
|
_________________ Discord: Shalimarwildcat |
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: 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!
|
|
|
|
|
|