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

Wall Lever Error

Northnorial

Member
Joined
May 30, 2009
Messages
742
Reaction score
5
Location
Germany
I'm getting this error message with this script

Error:
Code:
[03/12/2009 16:23:12] Lua Script Error: [Action Interface] 
[03/12/2009 16:23:12] data/actions/scripts/theend/walllever.lua:onUse

[03/12/2009 16:23:12] luaDoTransformItem(). Item not found

Sript:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local firstWall = {x=1251, y=893, z=5, stackpos=1}
	local secondWall = {x=1252, y=893, z=5, stackpos=1}
	local secondLever = {x=1263, y=909, z=4, stackpos=1}
	local getSecondLever = getThingfromPos(secondLever)
	local getFirstWall = getThingfromPos(firstWall)
	local getSecondWall = getThingfromPos(secondWall)
	if(item.uid == 7002) then
		if(item.itemid == 1945) then
			doTransformItem(secondLever.uid, 1946)
			doTransformItem(item.uid, 1946)
			doRemoveItem(getFirstWall.uid, 1)
			doRemoveItem(getSecondWall.uid, 1)
		elseif(item.itemid == 1946) then
			doTransformItem(secondLever.uid, 1945)
			doTransformItem(item.uid, 1945)
			doCreateItem(1052, 1, firstWall)
			doCreateItem(1052, 1, secondWall)		
		else
			doPlayerSendCancel(cid,"Sorry, not possible.")
		end
	end
	return TRUE
end


Thanks for helping me.. I'll rep +
 
You are trying to transform coordinates, rather than a reference to an item.

change "secondLever.uid" into "getSecondLever.uid" in the doTransformItem() function.
 
Back
Top