How do I detect jump fail?
Hi,
I need to detect when one of these jumps fails: FastTravelToNode() JumpToGroupLeader() JumpToGroupMember() JumpToFriend() JumpToGuildMember() I have tried registering for these events: EVENT_JUMP_FAILED EVENT_REQUIREMENTS_FAIL EVENT_ABILITY_REQUIREMENTS_FAIL My routine never seems to get called even when the jump fails. A message is usually displayed in the chat but I need to detect it in the program. Does anyone know what I am doing wrong? |
I'm not on to test, but this one EVENT_JUMP_FAILED should do it. Post your code that uses that one.
|
I thought it was a bit large to do this and I have edited to cut down the size but here is part one:
Code:
JumpBlock = { |
The JumpTo functions do not return their status via any of the events you listed.
Instead you have to listen to EVENT_SOCIAL_ERROR which will return a SOCIAL_RESULT_, but you also need to listen to other events for some edge cases that stop the jump, but won't fire a social error. There are quite a few cases you need to handle. I suggest you take a look at EasyTravel's JumpHelper.lua. |
Thanks sirinsidiator. That explains the problems I have been experiencing.
I think some of my code may resemble yours in the end. |
All times are GMT -6. The time now is 01:50 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI