MMOMinion

Full Version: GetAetheryteByMapID returns nil aetheryte ID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
The function returns an aetheryte object now.
(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.