• 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 error create monster

Tegardee

The Boss
Joined
Jun 18, 2014
Messages
106
Reaction score
0
Location
Brazil
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.

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
 
I think you need to change the source code to remove this error. The luaDoCreateMonster function prints an error instead of returning false. But you could just ignore the error. It's not dangerous in any way. =P
 
Last edited:
That isn't an error, just the monster the killer doesn't not exists on your server, if you want to remove that warning line in your console you will need to do some source editing just like above stated.
 
however friends, though it may be insignificant gets boring see this error every time misses the name of a monster, and I have the tfs 0.4 sources, but just do not know where to edit.

edit: thanks for the support ladies and gentlemen, but already managed to fix the luaDoCreateMonster, thank you so much to everyone who gave support.
 
Last edited:
Back
Top