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

Demon Castle

Balicuss

New Member
Joined
Jul 5, 2009
Messages
193
Reaction score
1
Location
POLand
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:
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.lua:onCreatureSay
[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>
 
Are you using Crying Damson 0.3.4 PL2 or another distro?
The reason I'm asking is because different distro's have different functions. The user who made this script obviously was using a distro that had getDataInt, getPlayerEventType etc

Your getting callback and traceback errors because you don't have those functions.
 
if you use 0.4tfs its very difficult cause tfs 0.4 doesnt support alot of lua functions you gotta compile a distro yourself to support those lua functions T_T for real dude.. thats why u HAVE TO WAIT!!! going to 0.4 cause its terrible with supporting lua functions..
 
Back
Top