hello people, so I started using TFS 0.4, but I could fix the errors, but has an error Command / m, it works as usual creates all the monster right though this error when you try to create a nonexistent monster appears in tfs.
creature.lua:
Code:
[20/7/2014 16:57:20] [Error - TalkAction Interface]
[20/7/2014 16:57:20] data/talkactions/scripts/creature.lua:onSay
[20/7/2014 16:57:20] Description:
[20/7/2014 16:57:20] (luaDoCreateMonster) Monster with name 'the killer' not found
creature.lua:
Code:
function onSay(cid, words, param, channel)
local func = doCreateMonster
if(words:sub(2, 2) == "n") then
func = doCreateNpc
end
local pid = cid
local t = string.explode(param, ",")
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end
local position = getCreaturePosition(pid)
local effect = CONST_ME_MAGIC_RED
local ret = func(t[1], position, false)
if(tonumber(ret) == nil) then
effect = CONST_ME_POFF
doPlayerSendDefaultCancel(cid, (ret == false and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM))
end
doSendMagicEffect(position, effect)
return true
end