• 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!

Im a little stuck on a function.

RosOT

Who am i?
Joined
Feb 12, 2013
Messages
714
Reaction score
137
Location
Canada
Ok well i want this function to get Rebirths from players.

Lua:
function getPlayerRebirth(cid)
    local Info = db.getResult("SELECT `Rebirth` FROM `players` WHERE `id` = " .. getPlayerId(cid) .. " LIMIT 1")
        if Info:getID() ~= LUA_ERROR then
        local Rebirth= Info:getDataInt("Rebirth")
        Info:free()
        return Rebirth
    end
     return LUA_ERROR
end

- - - Updated - - -

Fixxed Thanks for the help :p
 
Lua:
function getPlayerRebirths(cid)
    local Info = db.getResult("SELECT `Rebirths` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
        if Info:getID() ~= LUA_ERROR then
        local Rebirths= Info:getDataInt("Rebirths")
        Info:free()
        return Rebirths
    end
     return LUA_ERROR
end

Changed
Lua:
getPlayerAccountId(cid)
With
Lua:
getPlayerGUID(cid)
 
Back
Top