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

Lua Error with Snake System.

Zt0ffe

New Member
Joined
Sep 26, 2008
Messages
341
Reaction score
4
Location
Sweden
Im using this code from: https://otland.net/threads/mod-mocks-classic-snake-remade-to-mod.177781/

But I get this error when Im trying to start up the server. Anyone has any idea why?

Code:
[16:30:06.186] Description:
[16:30:06.186] [string "sConf = {..."]:8: '}' expected (to close '{' at line 1) near '874'

[16:30:06.186] [Error - TalkAction Interface]
[16:30:06.186] domodlib('snake-Conf')
[16:30:06.186] domodlib('snake-lib')
[16:30:06.186] function onSay(cid, words, param, channel)
[16:30:06.186] if param == "" then
[16:30:06.186] doPlayerSendTextMessage(cid,35, "[Classic Snake]: If you really want to reset your highscore for Classic Snake write: /resetsnake yes")
[16:30:06.187] return true
[16:30:06.187] end
[16:30:06.187] if param == "yes" then
[16:30:06.187] doPlayerSendTextMessage(cid,4, "[Classic Snake]: You have reseted your highscore for Classic Snake.")
[16:30:06.187] db.executeQuery("UPDATE `accounts` SET `snakehigh` = '0' WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
[16:30:06.187] return true
[16:30:06.187] end
[16:30:06.187] end

[16:30:06.187] Description:
[16:30:06.187] [string "sConf = {..."]:8: '}' expected (to close '{' at line 1) near '874'

[16:30:06.187] [Error - TalkAction Interface]
[16:30:06.187] domodlib('snake-Conf')
[16:30:06.187] domodlib('snake-lib')
[16:30:06.187] function onSay(cid, words, param, channel)
[16:30:06.187] if param == "" then
[16:30:06.187] doPlayerSendTextMessage(cid,35, "[Classic Snake]: If you really want to reset the server highscore for Classic Snake write: /rsnakehighscore yes")
[16:30:06.187] return true
[16:30:06.187] end

[16:30:06.187] if (param == "yes" and (getPlayerGuildName(cid) == 'PAG Crew')) then
[16:30:06.187] db.query("UPDATE `game_highscores` SET `snake` = 0 AND 'snakename' = "..getPlayerGUID(cid).." WHERE `id` = 1;")
[16:30:06.187] doPlayerSendTextMessage(cid,4, "[Classic Snake]: You have reseted the server highscore for Classic Snake.")
[16:30:06.187] return true
[16:30:06.187] end
[16:30:06.187] end

[16:30:06.187] Description:
[16:30:06.187] [string "sConf = {..."]:8: '}' expected (to close '{' at line 1) near '874'

[16:30:06.187] [Error - TalkAction Interface]
[16:30:06.187] domodlib('snake-Conf')
[16:30:06.187] domodlib('snake-lib')
[16:30:06.187] function onSay(cid, words, param, channel)
[16:30:06.187] if param == "" then
[16:30:06.187] doPlayerSendTextMessage(cid,35, "[Classic Snake]: If you really want to reset the server highscore for Classic Snake write: /rsnakehighscore yes")
[16:30:06.187] return true
[16:30:06.187] end

[16:30:06.187] if (param == "yes" and (getPlayerGuildName(cid) == 'PAG Crew')) then
[16:30:06.187] db.query("UPDATE `game_highscores` SET `snake` = 0 AND 'snakename' = "..getPlayerGUID(cid).." WHERE `id` = 1;")
[16:30:06.187] doPlayerSendTextMessage(cid,4, "[Classic Snake]: You have reseted the server highscore for Classic Snake.")
[16:30:06.187] return true
[16:30:06.187] end
[16:30:06.187] end

[16:30:06.187] Description:
[16:30:06.187] [string "sConf = {..."]:8: '}' expected (to close '{' at line 1) near '874'
This error from it.
 
Got this one now:

Code:
[5:13:17.876] [Error - Action Interface]
[5:13:17.876] domodlib('snake-Conf')
[5:13:17.876] domodlib('snake-lib')
[5:13:17.876] function onUse(cid, item, frompos, item2, topos)
[5:13:17.876] if not isPlayer(getGlobalStorageValue(sConf.freeglobalstorage)) then
[5:13:17.876] doTeleportThing(cid,sConf.controlpos)
[5:13:17.876] SNAKE.timer(cid,1,nil,item.actionid == 0 and 500 or item.actionid)
[5:13:17.876] doPlayerSendTextMessage(cid,17,'[Classic Snake]: Hold key CTRL and use the arrows to control snake.')
[5:13:17.876] SNAKE.generateFood()
[5:13:17.876] else
[5:13:17.876] doPlayerSendTextMessage(cid,17,'Please wait.')
[5:13:17.876] end
[5:13:17.876] end
[5:13:17.876] :onUse
[5:13:17.876] Description:
[5:13:17.876] [string "domodlib('snake-Conf')..."]:139: attempt to index local 'p2' (a number value)
[5:13:17.876] stack traceback:
[5:13:17.876]   [string "domodlib('snake-Conf')..."]:139: in function 'samepos'
[5:13:17.876]   [string "domodlib('snake-Conf')..."]:127: in function 'timer'
[5:13:17.876]   [string "LuaInterface::loadBuffer"]:6: in function <[string "LuaInterface::loadBuffer"]:3>
> Broadcasted message: "If you want to sell something when you are offline - use our Auction System!".
 
Last edited:
Back
Top