Go to Page... |
|
Thread Tools | Display Modes |
|
01-29-12, 04:43 PM | #1 |
How do you "wait" without crashing the game client.
I want to process my mailbox, then take the attachments and finally delete the email.
Two of these actions interacts with the global command queue. If I want to make sure everything is processed in order, I need to be able to wait after the queue. As such I've created a small function that loops while the queue becomes available. Code:
local function wait_for_queue() local queue_is_not_ready = Inspect.Queue.Status("global") while queue_is_not_ready == true do queue_is_not_ready = Inspect.Queue.Status("global") end end My question is how do you get to wait for the Queue without crashing the game client? |
|
02-10-12, 12:21 PM | #4 |
I'm not able to post on Rift forums (Rift Lite, etc. - willing to change that very soon).
Code:
local queueStatus = false local function QueueStatus() queueStatus = Inspect.Queue.Status("global") if queueStatus then return end -- global queue is still backlogged, var is true so exit out queueStatus = false end table.insert(Event.Queue.Status, {QueueStatus, "MyAddon", "Queue Status"}) local commandOne = false local commandTwo = false local commandThree = false function MyAddon:DoCommands() if not commandOne and not queueStatus then command.blah1 commandOne = true elseif not commandTwo and not queueStatus then command.blah2 commandTwo = true elseif not commandThree and not queueStatus then command.blah3 commandThree = true end commandOne, commandTwo, commandThree = false, false, false end Code:
table.insert(Event.Queue.Status, {QueueStatus, "MyAddon", "Queue Status"}) What I'm willing to do is, wait until a Command.Item.Move() is complete, then run 2 functions. Ideas how I can do that ? Thanks in advance! |
|
02-10-12, 02:27 PM | #5 | |
Quote:
http://forums.riftgame.com/beta-addo...low-error.html I ended up combining both a "Queue" and a "thread" manager. |
||
02-11-12, 03:51 AM | #6 |
Thank you!
With the info in the post you provided me, I created the LibCoroutine. It's very early and the code can be considered Alpha quality. It's included with zBag (Alpha4), in case you want to take a look on how I implemented it. Suggestions / improvements are welcome |
|
Riftui » AddOns, Layouts and Macros » Help/Support » How do you "wait" without crashing the game client. |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|