This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
In the code block below, C_Map.GetMapInfo() is called before the mapID is checked for validity. This allows C_Map.GetMapInfo() to throw an error if mapID=nil instead of allowing "if ( not mapID ) then return" to exit the routine. Suggest moving the C_Map.GetMapInfo() after the conditional return if-block.
function A:GetCurrentMapID() local mapID = C_Map.GetBestMapForUnit("player"); local mapInfo = C_Map.GetMapInfo(mapID); A:DebugMessage(("GetCurrentMapID() - mapID: %s"):format(tostring(mapID))); if ( not mapID ) then A.currentMapID = 0; return; end
Thank you for pointing that to me.
To post a comment, please login or register a new account.