hello
I have one problem with demon castle.
http://otland.net/f82/simple-script-but-i-think-good-idea-d-20408/#post206684
I add this to /lib/050-function.lua and it don't work.
Add this to your function.lua:
I have one problem with demon castle.
http://otland.net/f82/simple-script-but-i-think-good-idea-d-20408/#post206684
I add this to /lib/050-function.lua and it don't work.
Add this to your function.lua:
function getPlayerEventType(cid)
local Info = db.getResult("SELECT `event` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
if Info:getID() ~= LUA_ERROR then
local event= Info:getDataInt("event")
Info:free()
return event
end
return LUA_ERROR
end
[16:22:01.605] [Error - NpcScript Interface]
[16:22:01.605] data/npc/scripts/demon_castle.luanCreatureSay
[16:22:01.605] Description:
[16:22:01.605] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[16:22:01.605] stack traceback:
[16:22:01.605] [C]: in function 'error'
[16:22:01.605] data/lib/004-database.lua:60: in function 'getDataInt'
[16:22:01.605] data/lib/050-function.lua:666: in function 'getPlayerEventType'
[16:22:01.605] data/npc/scripts/demon_castle.lua:35: in function 'callback'
[16:22:01.605] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay'
[16:22:01.606] data/npc/scripts/demon_castle.lua:9: in function <data/npc/scripts/demon_castle.lua:9>