MMOMinion
GetAetheryteByMapID returns nil aetheryte ID - Printable Version

+- MMOMinion (https://www.mmominion.com)
+-- Forum: FFXIVMinion (https://www.mmominion.com/forumdisplay.php?fid=87)
+--- Forum: Support - English, Deutsch, 中文 (https://www.mmominion.com/forumdisplay.php?fid=92)
+---- Forum: English Support & Questions (https://www.mmominion.com/forumdisplay.php?fid=93)
+---- Thread: GetAetheryteByMapID returns nil aetheryte ID (/showthread.php?tid=14609)



GetAetheryteByMapID returns nil aetheryte ID - tadeus - 11-14-2015

I tried to use TaskManager today, it wouldn't teleport. I saw errors in console stating aethid is a nil value.

I changed the file to get some info.

If the map ID is 154 (North Shroud), the aetheryte id should have returned 7, but was nil.

Is the function broken or has it been changed again?

Code:
dbg("Teleport Mesh: "..location.mesh)
    dbg("Teleport Map ID: ".. location.map)

    local mapid,aethid = GetAetheryteByMapID(location.map,location)
    
    if (aethid ~= nil) then
      dbg("Teleport Aethyrite ID: ".. aethid)
      Player:Teleport(aethid)
      local newTask = ffxiv_task_teleport.Create()
      dbg("Changing to new location for task number "..tostring(TaskManager.taskIndex))
      newTask.mapID = location.map
      newTask.mesh =  location.mesh
      ml_task_hub:Add(newTask, IMMEDIATE_GOAL, TP_IMMEDIATE)
      return true
    else
      dbg("Teleport Aethyrite ID is nil")
      return false
    end



RE: GetAetheryteByMapID returns nil aetheryte ID - Ace - 11-15-2015

The function returns an aetheryte object now.


RE: GetAetheryteByMapID returns nil aetheryte ID - tadeus - 11-15-2015

(11-15-2015, 12:13 AM)Ace Wrote:  The function returns an aetheryte object now.

What are the properties of the object?

local Aetheryte = GetAetheryteByMapID(location.map,location) -- Is this the correct way to call it?

local aethid = Aetheryte.ID -- will this work?

Tried it, changed .ID to .id and it worked.