Herwiak
New Member
- Joined
- Jun 20, 2010
- Messages
- 9
- Reaction score
- 0
Hello. I'm using TFS 1.1
I've got problem with function:
I have definied function getPlayerAccountId(cid):
but when i'm trying to use it in npc script:
http://pastebin.com/5aPqg8r3
I have definied in lib:
I'm getting this error in console:
Please help me with this problem.
Regards,
Herwiak
I've got problem with function:
Code:
function getAccountLanguage(cid)
local resultId = db.executeQuery("SELECT `language` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid)) -- this is 122 line in global.lua
if resultId ~= false then
local days = result.getDataInt(resultId, "language")
result.free(resultId)
return days
end
return 0
end
Code:
function getPlayerAccountId(cid) local p = Player(cid) return p ~= nil and p:getAccountId() or false end
http://pastebin.com/5aPqg8r3
I have definied in lib:
Code:
ENGLISH = 0
POLISH = 1
I'm getting this error in console:
Please help me with this problem.
Regards,
Herwiak