Blysco
New Member
- Joined
- Oct 12, 2013
- Messages
- 163
- Reaction score
- 2
I get this Error "Error Luainterface loadfile Data/actions/scripts/4ani/4_ani.lua
Data/actions/scripts/4ani/4_ani.lua:29: `>`expected near `then`
Done. I use The forgotten Server 0.3.7_SV Crying Damson
Tibia Version 9.83

Data/actions/scripts/4ani/4_ani.lua:29: `>`expected near `then`
Done. I use The forgotten Server 0.3.7_SV Crying Damson
Tibia Version 9.83

Code:
local config = {
daily = "no", -- allow only one enter per day? (like in global Tibia)
level = 100,
storage = 11020
}
local playerPosition =
{
{x = 32392, y = 32191, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 32392, y = 32192, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 32392, y = 32193, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 32392, y = 32194, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
{x = 32259, y = 32154, z = 15},
{x = 32258, y = 32154, z = 15},
{x = 32258, y = 32153, z = 15},
{x = 32259, y = 32153, z = 15}
local demonPosition =
{
{x = 32263, y = 32161, z = 15},
{x = 32270, y = 32161, z = 15},
{x = 32269, y = 32169, z = 15},
{x = 32268, y = 32177, z = 15},
{x = 32287, y = 32177, z = 15},
{x = 32287, y = 32168, z = 15},
{x = 32287, y = 32161, z = 15},
{x = 32298, y = 32162, z = 15}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = {0, 0, 0, 0}
local failed = TRUE
local count = 0
item.new = 1946
if(item.itemid == 1945) then
if(os.time(t) >= (getGlobalStorageValue(10020) + (1000)) then
for i = 1, 4 do
player[i] = getThingfromPos(playerPosition[i])
if(player[i].itemid > 0) then
if(isPlayer(player[i].uid) == TRUE) then
if(getPlayerStorageValue(player[i].uid, 9000) < 1) then
if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then
failed = FALSE
count = count + 1
end
end
end
end
if(failed == TRUE) then
doTransformItem(item.uid, 1946)
return TRUE
end
end
if(count == 4) then
for i = 1, 6 do
doSummonCreature("Demon", demonPosition[i])
end
for i = 1, 4 do
doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
doTeleportThing(player[i].uid, newPosition[i], FALSE)
doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
setPlayerStorageValue(player[i].uid, 9000, 1)
end
setGlobalStorageValue(9000, os.time(t))
end
end
else
item.new = 1945
end
doTransformItem(item.uid, item.new)
return TRUE
end