Thread Tools Display Modes
Prev Previous Post   Next Post Next
04/16/14, 11:28 AM   #1
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 692
Help with Reticle over Fishing Hole error

Irrespective of what the routine's syntax is I get an error when the loading screen closes and the player Reticle is over a Fishing Hole. I have it such that if the players Reticle is over something and GetString(SI_GAMECAMERAACTIONTYPE16) which is fishing, then preform an action.

Code:
if not Harvest.nodes.data[zone] then
		return false
	end
The problem is that the check occurs before the above Harvest.nodes.data[zone] is available. So I can't check it for nil either because the loading screen just went away and for a brief moment the information is not available.

Code:
if Harvest.nodes.data[zone] == nil then
	return
end
This will fail.

Code:
if Harvest.nodes.data == nil then
	return
end
This will fail.

Code:
if Harvest.nodes == nil then
 	return
end
This does not fail so the routine is not used and the error does not occur.

Question is how can I resolve this better? Is there a way to check, if the loading screen is open, and the game is busy, don't do anything?
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Help with Reticle over Fishing Hole error


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off