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

Login.lua .. HELP!

LordiN

New Member
Joined
Aug 11, 2007
Messages
45
Reaction score
0
Hello, its my error in login.lua in function vip in letter '
Help please..!

Error..!
[01/09/2009 18:31:06] data/db.lua:41: LuaSQL: Error executing query. MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'knight'' at line 1
[01/09/2009 18:31:06] stack traceback:
[01/09/2009 18:31:06] [C]: in function 'assert'
[01/09/2009 18:31:06] data/db.lua:41: in function 'getResult'
[01/09/2009 18:31:06] data/Vip_Functions.lua:2: in function 'getAccount'
[01/09/2009 18:31:06] data/Vip_Functions.lua:36: in function 'isVip'
[01/09/2009 18:31:06] data/creaturescripts/scripts/login.lua:4: in function <data/creaturescripts/scripts/login.lua:1

Its my Login.lua
function onLogin(cid)
local playerPos = getCreaturePosition(cid)
local pos = {x = 32369, y = 32241, z = 7}
if isVip(cid) == TRUE then
doSendAnimatedText(playerPos, 'VIP!', 210)
setPlayerExtraExpRate(cid, 5000)
end
if isVip(cid) == FALSE then
doSendAnimatedText(playerPos, 'FREE!', TEXTCOLOR_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Adquira sua VIP já !")
setPlayerExtraExpRate(cid, 0)
end
if haveVipDays(cid) == FALSE then
if isVip(cid) == TRUE then
db.executeQuery("UPDATE `players` SET `town_id` = 5, `posx` = 32369, `posy` = 32241, `posz` = 7 WHERE `players`.`account_id` = ".. getAccount(cid) ..";")
db.executeQuery("UPDATE `accounts` SET `vip` = '0' WHERE `accounts`.`id` = ".. getAccount(cid) ..";")
doTeleportThing(cid, pos)
doSendMagicEffect(pos, 10)
getPlayerTown(cid, 5)
doSendAnimatedText(pos, 'FREE!', TEXTCOLOR_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua VIP expirou !")
setPlayerExtraExpRate(cid, 0)
end
end

setPlayerStorageValue(cid,29061,1)
registerCreatureEvent(cid, "DeathBroadcast")
--registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KilledMonstersCounter")

if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
for i = 1, 3 do
if getPlayerStorageValue(cid, 42300 + i * 10 - 1) < 1 then
for j = 0, 9 do
setPlayerStorageValue(cid, 42290 + i * 10 + j, 0)
end
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena


registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end

Thanks,
LordiN ~ [ADM]Apocalyptico in TheApocalypse Server
 
Back
Top