Deletes an entry from you mail index.


Parameters Edit

Arguments Edit

number - The index of the message to be deleted {1 .. GetInboxNumItems}.

Returns Edit

void - The method does not return any values.

Example Edit

-- Delete all mails without any check:
local numMails = GetInboxNumItems();
for index = 1 , numMails do

Notes Edit

  • Please note that the example above, is a very bad example on deleting all mails. Furthermore it may not work, as the server might stall since the delete requests are sent very frequently.
  • Events: When the deletion of the message is done, the event MAIL_INBOX_UPDATE should get raised. It may be a good idea to wait for this event before calling the DeleteInboxItem() again.
  • The developer of Ultimate Mail Mod has figured out that deleting mail directly after taking the item from the message may fail, since the message is locked for deletion. Also issuing a lot of deletes after another may result in some deletions not being triggered.
  • Every developer knows the issues when deleting items in a loop by using the index. I'm not sure how long the index remains "stable". Maybe until we open the inbox again or maybe only until the delete is processed. Reviewing RoMail(2) shows strange coding to do mass deletion and Ultimate Mail Mod refreshes the local mail cache after each deletion.

Related Functions Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.