MMOMinion

Full Version: Target not registering
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Somehow I can't get the player target information to show in my data dump

Code snippets:

Code:
function QDMP.OnUpdateHandler (Event, ticks)
    if ( ticks - QDMP.lastticks > 250 ) then
        local target = Player:GetTarget()
        if ValidTable(target) then
            QDMP.currenttarget = target
        else
            QDMP.currenttarget = nil
        end
    end
end
(I actually used to do Player:GetTarget() in my button press event handler, but it didn't work so I put this in the Gameloop.Update event, it still doesn't work though...)

Here's how I use the current target (Excerpt)

Code:
    local dump = {}
-- [..]

    if QDMP.includetarget then
        
        if QDMP.currenttarget ~= nil then
            dump["taget"] = QDMP.currenttarget
        else
            d("[QDMP] No target found")
        end
    end

-- [..]

    d("[QDMP] Writing data to: "..targetfile)
    if FileSave(targetfile, dump) then
        d("[QDMP] Dump file saved succesfully")
    else
        d("[QDMP] Failed to save file, check permissions and/or for existing files")
    end

The target file output is just target = { },

From the dev monitor this seems to work just fine so I'm wondering if I'm just missing something extremely obvious. I do actually get stuff like Player.pos and that works as expected. :GetTarget() just won't get me a result