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

Error - CreatureScript Interface

mesosot

Member
Joined
Aug 16, 2007
Messages
356
Reaction score
5
[27/04/2011 14:29:29] Meso has logged in.

[27/04/2011 14:29:29] [Error - CreatureScript Interface]
[27/04/2011 14:29:29] buffer:eek:nLogin
[27/04/2011 14:29:29] Description:
[27/04/2011 14:29:29] [string "loadBuffer"]:4: attempt to call global 'getPlayerVipDays' (a nil value)
[27/04/2011 14:29:29] stack traceback:
[27/04/2011 14:29:29] [string "loadBuffer"]:4: in function <[string "loadBuffer"]:2>
[27/04/2011 14:29:29] Meso has logged out.
 
Solved
here To Do :-

Go to your phpmyadmin and execute:


ALTER TABLE `accounts` ADD
`vipdays` int(11) NOT NULL DEFAULT 0;

Now, go to data/lib/function.lua and add this lines in the top.

--- Vip functions by Kekox
function getPlayerVipDays(cid)
local Info = db.getResult("SELECT `vipdays` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1")
if Info:getID() ~= LUA_ERROR then
local days= Info:getDataInt("vipdays")
Info:free()
return days
end
return LUA_ERROR
end

function doAddVipDays(cid, days)
db.executeQuery("UPDATE `accounts` SET `vipdays` = `vipdays` + " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end

function doRemoveVipDays(cid, days)
db.executeQuery("UPDATE `accounts` SET `vipdays` = `vipdays` - " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end
 
Back
Top