bpm91
Intermediate OT User
- Joined
- May 23, 2019
- Messages
- 882
- Solutions
- 7
- Reaction score
- 123
- Location
- Brazil
- YouTube
- caruniawikibr
Hi, does anyone know how I can fix this error?
Lua:
function rune.onCastSpell(creature, variant)
local position = variant:getPosition()
local tile = Tile(position)
local field = tile and tile:getItemByType(ITEM_TYPE_MAGICFIELD)
if field and table.contains(Fields, field:getId()) then
field:remove()
position:sendMagicEffect(CONST_ME_POFF)
return true
end
creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end