Jump to content

[Ayuda] dbQuery , Uncollected after 5 Minutes


Recommended Posts

Posted

Hola buenas tengo un problema y es que este error me satura el debug no he notado que afecte algo importante pero como puedo arreglarlo?

MjQ7V2X.png

function backupAllTentZ() 
    dbQuery(db, "DROP TABLE tents") 
    dbQuery(db, "CREATE TABLE IF NOT EXISTS tents (model, x, y, z, rx, ry, rz, slots, scale, itemy, id)") 
    counter = 0  
    for i, col in ipairs(getElementsByType("colshape")) do 
        local tnt = getElementData(col, "tent") 
        if tnt then 
            local TheTent = getElementData(col, "parent") 
            local x, y, z = getElementPosition(TheTent) 
            local rx, ry, rz = getElementRotation(TheTent) 
            local model = getElementModel (TheTent) 
            local slots = getElementData (col,"MAX_Slots") or 100 
            local scale = getObjectScale (TheTent) 
            counter = counter + 1 
            local theBk = {1, 0} 
            dbQuery(db, "INSERT INTO tents (model, x, y, z, rx, ry, rz, slots, scale, itemy, id) VALUES(?,?,?,?,?,?,?,?,?,?,?)", model, x, y, z, rx, ry, rz, slots, scale, toJSON(theBk), counter) 
            for i, v in ipairs(itemsDataTable) do 
                local itemQuant = getElementData(col, v[1]) 
                if itemQuant then 
                    if itemQuant >= 1 then 
                        ItemId = createIdForItem(v[1]) 
                        itemy = {ItemId, itemQuant} 
                        dbQuery(db, "INSERT INTO tents (itemy, id) VALUES(?,?)", toJSON(itemy), counter) --- LINEA 452 
                    end 
                end 
            end 
        end 
    end 
    noteAdmins("Tents backup done! ["..counter.."]") 
end 

Posted
Después de un:
dbQuery 

Utiliza un:

dbFree 

Esto es para disponer del resultado de la query.

Algo asi?

  
sd = dbQuery(db, "INSERT INTO tents (itemy, id) VALUES(?,?)", toJSON(itemy), counter) 
dbFree ( sd ) 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...