Hi guys...
Script anihilator...
Here the code. ( 100% working )
My problem...
When it does not have a monster in the area occurs this error. When it has a monster in the area does not happen this error.
My suggestion.
Can here be where the error occurs.
Sorry to my bad english
Bye bye!!
Script anihilator...
Here the code. ( 100% working )
starting={x=1197, y=837, z=10, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=1235, y=870, z=10, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=766, y=1225, z=14}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
My problem...
When it does not have a monster in the area occurs this error. When it has a monster in the area does not happen this error.
My suggestion.
if players==0 then
trash= {x=766, y=1225, z=14}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
Can here be where the error occurs.
Sorry to my bad english
Bye bye!!
Last edited: