• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

bad argument #1 to 'pairs' / tfs 1.5 8.6

vexler222

Active Member
Joined
Apr 22, 2012
Messages
714
Solutions
15
Reaction score
46
Hi, i have problem:
1655587147112.png

I got this script from brazil datapack, but im sure in 100% i copy all files.


Globalevents:
Code:
function onThink(interval)

    local ricardoViado = SUPERUP:freeCave()

    for _, b in pairs(ricardoViado) do
        if os.time() >= b[2] then
           db.query(string.format("UPDATE exclusive_hunts SET `guid_player` = %d, `time` = %s, `to_time` = %s WHERE `hunt_id` = %d", 0, 0, 0, b[1]))
        end
    end
    return true
end

SUPERUP:freeCave function:
Code:
function SUPERUP:freeCave()
    freeCaves = {}
    local db = db.storeQuery("SELECT `hunt_id`, `to_time`, `guid_player` FROM exclusive_hunts")
    if not db then
        return
    end

    repeat
        local idHunt = result.getDataInt(db, "hunt_id")
        local tempoFinal = result.getDataLong(db, "to_time")
        local guidPlayer = result.getDataInt(db, "guid_player")
        result.free(db)

        table.insert(freeCaves, {idHunt, tempoFinal, guidPlayer})

    until not result.next(db)
    return freeCaves
end
 
U fix this problem?
there are 20000 and 20001 before using one but when you use one they are placed as in the picture
 

Attachments

  • IMG-20220616-WA0007.jpg
    IMG-20220616-WA0007.jpg
    15.9 KB · Views: 7 · VirusTotal
U fix this problem?
there are 20000 and 20001 before using one but when you use one they are placed as in the picture
Here you have theard about this problem

 
Back
Top