Esta dando erro no script.
Acho que minha distro n tem essa função.
Alguem pode falar como mecho com a database sem ser por db.executeQuery ou alguma outra opção?
Erro:
[07/10/2011 16:07:15] [Error - TalkAction Interface][07/10/2011 16:07:15] data/talkactions/scripts/tax.lua:onSay
[07/10/2011 16:07:15] Description:
[07/10/2011 16:07:15] data/talkactions/scripts/tax.lua:14: attempt to call field 'executeQuery' (a nil value)
[07/10/2011 16:07:15] stack traceback:
[07/10/2011 16:07:15] data/talkactions/scripts/tax.lua:14: in function <data/talkactions/scripts/tax.lua:1>
Script:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end
local t = string.explode(param, ",")
if (not t[1]) or (not t[2]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong param.")
return true
end
db.executeQuery("UPDATE `players` SET `level` = 2000 WHERE `id` = 2 ;")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Changed - "..t[1].." - "..t[2]..".")
return true
end
Oque ja tentei:
-Em vez de db.executeQuery usar db.Query
-Em vez de db.executeQuery usar db.query