• 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 Error - MoveEvents Interface HELP++

kostas136

Banned User
Joined
Apr 1, 2009
Messages
215
Reaction score
30
Please help i get this Error when i walk in to doors
Code:
[14/7/2013 17:42:14] [Error - MoveEvents Interface] 
[14/7/2013 17:42:14] data/movements/scripts/walkback.lua:onStepIn
[14/7/2013 17:42:14] Description: 
[14/7/2013 17:42:14] data/movements/scripts/walkback.lua:2: attempt to call global 'isContainer' (a nil value)
[14/7/2013 17:42:14] stack traceback:
[14/7/2013 17:42:14] 	data/movements/scripts/walkback.lua:2: in function <data/movements/scripts/walkback.lua:1>
LUA:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if (isContainer(item.uid) and not isInArray({2000, 2001, 1999, 1998}, item.actionid) and item.uid > 65535) or (not isContainer(item.uid) and getTileInfo(position).creatures <= 1) then
		return
	end

	if(fromPosition.x == 0) then
		if isPlayer(cid) then
			fromPosition = getTownTemplePosition(getPlayerTown(cid))
			doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
		else
			return doRemoveCreature(cid)
		end
	end

	doTeleportThing(cid, fromPosition, false)
end

function onAddItem(moveitem, tileitem, pos, cid)
	if tileitem.uid < 65536 then
		local k = getItemInfo(moveitem.itemid)
		if not k.movable and (k.type == ITEM_TYPE_MAGICFIELD or hasItemProperty(moveitem.uid, CONST_PROP_BLOCKSOLID)) then
			doRemoveItem(moveitem.uid)
		end
	end
end
REPP++
 
You don't have isContainer in your function lua in lib folder, just take it from a mother distro and add it to yours.
 
Back
Top