View Single Post
04/25/14, 03:16 PM   #1
Teli
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 19
waiting for event to trigger

I'm working on an addon that delete unwanted mail items. The problem I'm having is if I loop through the MailIds to call DeleteMail(MailId) it will delete the first one and then it won't delete the rest. The issue seems to be because the server needs to act on the first one before it can act on the rest. I can queue up other items to be deleted in by adding them to the EVENT_MAIL_REMOVED event. I'm wondering what is the best way to pause the function or wait until there is a response back from the server or time out.?
  Reply With Quote