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() My question is how do you get to wait for the Queue without crashing the game client? |
Answered here.
|
Quote:
|
I'm not able to post on Rift forums (Rift Lite, etc. - willing to change that very soon).
Code:
local queueStatus = false 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! :) |
Quote:
http://forums.riftgame.com/beta-addo...low-error.html I ended up combining both a "Queue" and a "thread" manager. |
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 :D |
Quote:
I'll have a look at your library. Not sure I'll implement it for my add-on since I've already done this part, but maybe for my next project :o |
Quote:
I've uploaded it here: http://www.riftui.com/downloads/info...Coroutine.html It doesn't support Queue, like you used on your project ( I still need to study that part ), but in case you need it in your next project and want to improve the library, you're more than welcome to do so :D |
here's how I have combines both:
Code:
-- Coroutines management table |
How do you handle the "pause" command ? I don't see a registered coroutine.
Also, I don't see QueueStatus() returning a value, and queueStatus var is never read on mailOpen(k). May I give you a suggestion ? Always start functions with Capital letter and avoid naming variables with the same name as functions, just differing on letter capitalization :) |
Quote:
Quote:
Quote:
|
All times are GMT -6. The time now is 06:59 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2022 MMOUI