• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Fixed

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,300
Location
Sweden?
Fixed!
 
Last edited:
I would guess that you need to check if there are actually creatures in the table.
I just tested this and it worked fine, with no errors.

EDIT: Tested with no creatures around, didn't print error, therefore I can't reproduce it.
Like Summ said, post the whole error.
 
Code:
[20:50:21.382] [Error - NpcScript Interface]
[20:50:21.382] data/creaturescripts/scripts/onKillArea.lua:onThink
[20:50:21.382] Description:
[20:50:21.382] (LuaInterface::luaDoTargetCombatHealth) Creature not found

Seems, kill a monster by getting it hp, doesnt work, so i had to change it to this:
Code:
doTargetCombatHealth(0, tid, COMBAT_PHYSICALDAMAGE, -999999, -999999, CONST_ME_NONE)

But the error above, i get.
 
I try to send effect on that monster, get this:
Code:
(LuaInterface::luaGetThingPosition) Thing not found

by using this:
LUA:
doSendMagicEffect(getCreaturePosition(tid), 5)
 
if isMonster(tid) is true everything should be fine.
This makes no sense to me. You could redo it with a nested x y for loop and just loop through the square of positions insteads starting at posx - 3 to posx + 3 etc
 
Back
Top