Lava Titan
Developer
Hello, I'm trying to learn TFS 1.1 scripting tryed alot of different ways to make this but none seems to work...
This should check for monsters in a 20 sqm range
if theres monsters then player cant pass
if theres no monsters then player can pass
Error:
This should check for monsters in a 20 sqm range
if theres monsters then player cant pass
if theres no monsters then player can pass
Code:
local radiusX = 20
local radiusY = 20
local areapos = getCreaturePosition(cid)
if getSpectators(areapos, false, false, 0, radiusX, 0, radiusY) >= 1 then
player:sendTextMessage(MESSAGE_INFO_DESCR, 'Kill every monsters before pass...')
return true
end
Error:
Code:
stack traceback:
[C]: at 0x7ff76358bb90
[C]: in function 'getSpectators'
data/lib/compat/compat.lua:966: in function 'getSpectators'