waqmaz
Member
- Joined
- Jun 17, 2015
- Messages
- 203
- Reaction score
- 11
I want to detect if an item is on a position or not. the script (177 line):
The error:
/edit damn, lol. I miss ".uid". I am siting at this since yesterday and have just discovered it, so sorry. Hope it will be useful for somebody.
Code:
local redFlagPos = {x = 961, y = 1062, z = 7}
local blueFlagPos = {x = 973, y = 1062, z = 7}
local redFlagID = 1435
local blueFlagID = 4990
if getTileItemById(redFlagPos, redFlagID).uid > 0 then
doRemoveItem(getTileItemById(redFlagPos, redFlagID).uid)
elseif getTileItemById(blueFlagPos, blueFlagID) > 0 then
doRemoveItem(getTileItemById(blueFlagPos, blueFlagID).uid)
else
print('Fatal error nr 18!')
end
The error:
[04/07/2016 16:15:21] [Error - MoveEvents Interface]
[04/07/2016 16:15:21] In a timer event called from:
[04/07/2016 16:15:21] data/movements/scripts/Battleground/battleGround.luanStepIn
[04/07/2016 16:15:21] Description:
[04/07/2016 16:15:21] data/movements/scripts/Battleground/battleGround.lua:177: attempt to compare number with table
[04/07/2016 16:15:21] stack traceback:
[04/07/2016 16:15:21] data/movements/scripts/Battleground/battleGround.lua:177: in function <data/movements/scripts/Battleground/battleGround.lua:129>
/edit damn, lol. I miss ".uid". I am siting at this since yesterday and have just discovered it, so sorry. Hope it will be useful for somebody.