L
LordVissie
Guest
Hey guys, I'm trying to learn lua as the title says but I got an Error and I can't fix it somehow.
How it's supposed to work is: If you have 10cc with you. You can go trough the tp. If you don't have 10cc you can't and it tp's you 2 sqm behind you.
(This is one of my first scripts and it probally looks bad but I just wanna learn it)
But the error I get is this:
I see nothing weird on line 6.
Thanks for the help
How it's supposed to work is: If you have 10cc with you. You can go trough the tp. If you don't have 10cc you can't and it tp's you 2 sqm behind you.
(This is one of my first scripts and it probally looks bad but I just wanna learn it)
Code:
local teleport = {pos = {x = 908, y = 888, z = 9}}
local noMonayTP = {pos = {x = 943, y = 888, z = 9}}
function onStepIn(cid, item, position, fromPosition)
if(getPlayerItemCount(cid, 2160) >= 10) then
doPlayerRemoveMoney(cid, 10000) then
doTeleportThing(cid, teleport)
else
doCreatureSay(cid, "You need 10CC to try this quiz.", 19)
doTeleportThing(cid, noMonayTP)
return true
end
But the error I get is this:
Code:
[Error - LuaScriptInterface::loadFile] data/movements/scripts/quizquest.lua:6: unexpected symbol near 'then'
[Warning - Event::loadScript] Cannot load script (data/movements/scripts/quizquest.lua)
data/movements/scripts/quizquest.lua:6: unexpected symbol near 'then'
I see nothing weird on line 6.
Thanks for the help