Positions are right but when there's 4 characters on the tiles and when you click the lever it just says "Sorry not possible." and nothing happens. Here's what it says in the server console or what ever.
[04/02/2010 13:03:33] [Error - Action Interface]
[04/02/2010 13:03:33] data/actions/scripts/quests/annihilator.luanUse
[04/02/2010 13:03:33] Description:
[04/02/2010 13:03:33] data/actions/scripts/quests/annihilator.lua:48: attempt to index field '?' (a number value)
[04/02/2010 13:03:33] stack traceback:
[04/02/2010 13:03:33] data/actions/scripts/quests/annihilator.lua:48: in function <data/actions/scripts/quests/annihilator.lua:28>
This is my action.xml, pretty sure thats right though.
<action actionid="30015" event="script" value="quests/annihilator.lua"/>
Here's my annihilator.lua.
local config = {
daily = "no",
level = 101,
storage = 30015
}
local playerPosition =
{
{x = 511, y = 500, z = 13},
{x = 510, y = 500, z = 13},
{x = 509, y = 500, z = 13},
{x = 508, y = 500, z = 13}
}
local newPosition =
{
{x = 511, y = 419, z = 13},
{x = 510, y = 419, z = 13},
{x = 509, y = 419, z = 13},
{x = 508, y = 419, z = 13}
}
-- Do not modify the declaration lines below.
local players = {}
local failed = true
config.daily = getBooleanFromString(config.daily)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 1946) then
if(config.daily) then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doTransformItem(item.uid, item.itemid - 1)
end
return true
end
if(item.itemid ~= 1945) then
return true
end
for i, pos in ipairs(playerPosition) do
pos.stackpos = STACKPOS_TOP_CREATURE
players = getThingFromPos(playerPosition).uid
if(players > 0 and
isPlayer(players) and
getPlayerStorageValue(players.uid, config.storage) == -1 and
getPlayerLevel(players.uid) >= config.level)
then
failed = false
end
if(failed) then
doPlayerSendCancel(cid, "Sorry, not possible.")
return true
end
failed = true
end
for i, pid in ipairs(players) do
doSendMagicEffect(playerPosition, CONST_ME_POFF)
doTeleportThing(pid, newPosition, false)
doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
return true
end
If you know whats up please help me
Thanks,
Jordon.
[04/02/2010 13:03:33] [Error - Action Interface]
[04/02/2010 13:03:33] data/actions/scripts/quests/annihilator.luanUse
[04/02/2010 13:03:33] Description:
[04/02/2010 13:03:33] data/actions/scripts/quests/annihilator.lua:48: attempt to index field '?' (a number value)
[04/02/2010 13:03:33] stack traceback:
[04/02/2010 13:03:33] data/actions/scripts/quests/annihilator.lua:48: in function <data/actions/scripts/quests/annihilator.lua:28>
This is my action.xml, pretty sure thats right though.
<action actionid="30015" event="script" value="quests/annihilator.lua"/>
Here's my annihilator.lua.
local config = {
daily = "no",
level = 101,
storage = 30015
}
local playerPosition =
{
{x = 511, y = 500, z = 13},
{x = 510, y = 500, z = 13},
{x = 509, y = 500, z = 13},
{x = 508, y = 500, z = 13}
}
local newPosition =
{
{x = 511, y = 419, z = 13},
{x = 510, y = 419, z = 13},
{x = 509, y = 419, z = 13},
{x = 508, y = 419, z = 13}
}
-- Do not modify the declaration lines below.
local players = {}
local failed = true
config.daily = getBooleanFromString(config.daily)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 1946) then
if(config.daily) then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doTransformItem(item.uid, item.itemid - 1)
end
return true
end
if(item.itemid ~= 1945) then
return true
end
for i, pos in ipairs(playerPosition) do
pos.stackpos = STACKPOS_TOP_CREATURE
players = getThingFromPos(playerPosition).uid
if(players > 0 and
isPlayer(players) and
getPlayerStorageValue(players.uid, config.storage) == -1 and
getPlayerLevel(players.uid) >= config.level)
then
failed = false
end
if(failed) then
doPlayerSendCancel(cid, "Sorry, not possible.")
return true
end
failed = true
end
for i, pid in ipairs(players) do
doSendMagicEffect(playerPosition, CONST_ME_POFF)
doTeleportThing(pid, newPosition, false)
doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
return true
end
If you know whats up please help me
Thanks,
Jordon.