• 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!

Lua LuaDoCreateMonster

Akkz

New Member
Joined
Apr 22, 2012
Messages
172
Reaction score
0
I get this error in console when I make rotworms/fire elemental, any idea someone how I fix it?

[Error - TalkAction Interface]
data/talkactions/scripts/creature.lua:eek:nSay
Description:
(luaDoCreateMonster) Cannot create monster: rotworm
 
Oh, you can make them with the /m talkaction but it just gives an error? only with those 2 monsters? They do spawn normaly without errors in the map in spawn zones? Got any problems when you try to make them with doSummonCreature? And do you get also errors when you make them with /s?
 
Just get error when I use /m talkaction, not with /s. No errors in the map just in console, maybe that is why my server crash when players online? and when none is online I can have it online for days
 
Could be an other script that is crashing your server. I ment errors in the console when you make the monsters in spawn zones. But you only get an error with those 2 monsters and only with /m? So you have them in spawns in your server for people to hunt without any problems?
You can always try to remake them anyway.
 
You can just take a file from a monster that doesn't give errors with /m, copy that, change name/attacks/hp etc.
 
Which server do you use? you can try this one (make backup of your own incase it doesn't work}.
Lua:
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 know you ment thoose monsters, and yes the bug is still coming, could you take a look at the other thread? :/
 
Back
Top