marek12
Available for sprite works
- Joined
- Apr 8, 2020
- Messages
- 398
- Solutions
- 4
- Reaction score
- 394
Hello guys, does anyone know how to stop printing errors in console when I try for example summoning a creature which not exist?
here is the .lua code
Thanks !
Code:
[19:49:29.436] [Error - TalkAction Interface]
[19:49:29.442] data/talkactions/scripts/creature.lua:onSay
[19:49:29.448] Description:
[19:49:29.451] (LuaInterface::luaDoCreateMonster) Monster with name 'squirel' not found
here is the .lua code
Code:
function onSay(cid, words, param)
local func = doCreateMonster
if(words:sub(2, 2) == "n") then
func = doCreateNpc
end
local position = getCreaturePosition(cid)
local effect = CONST_ME_MAGIC_RED
if(func(param, position) == LUA_ERROR) then
effect = CONST_ME_POFF
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)
end
doSendMagicEffect(position, effect)
return TRUE
end
Thanks !