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

New System"equipment manager" need a bit help on script

izaak

New Member
Joined
Feb 1, 2009
Messages
161
Reaction score
3
Hi guys , this is my first script ever so i thought why not make a new system xD
i got basiclt everything running good exxecpt 1 little detail.
if someone would help me get the final bug out i would highly apreaciate it
REPP wil be given.


the global function made one bug go away but the action script keeps returning this when i click the item

heres the error

Code:
[08/09/2010 01:54:31] data/actions/scripts/Equiptment.lua:onUse
[08/09/2010 01:54:31] Description: 
[08/09/2010 01:54:31] data/actions/scripts/Equiptment.lua:8: attempt to call upvalue 'Item' (a nil value)
[08/09/2010 01:54:31] stack traceback:
[08/09/2010 01:54:31] 	data/actions/scripts/Equiptment.lua:8: in function <data/actions/scripts/Equiptment.lua:7>

Global script is.

Code:
function onThink (getInventoryItem)
	if(getInventoryItem(SLOT_HEAD)) then
		armor = getInventoryItem(SLOT_HEAD)getArmor()
		else
	if(getInventoryItem(SLOT_NECKLACE)) then
		armor = getInventoryItem(SLOT_NECKLACE)getArmor()
		else
	if(getInventoryItem(SLOT_ARMOR)) then
		armor = getInventoryItem(SLOT_ARMOR)getArmor()
		else
	if(getInventoryItem(SLOT_LEGS)) then
		armor = getInventoryItem(SLOT_LEGS)getArmor()
		else
	if(getInventoryItem(SLOT_FEET))then
		armor = getInventoryItem(SLOT_FEET)getArmor()
		else
	if(getInventoryItem(SLOT_RING)) then
		armor = getInventoryItem(SLOT_RING)getArmor()
		else
	return true
end
	end
		end
			end
		end 
	end
end

Action Script =

Code:
local Slot      = getSlotPosition
local Weapon    = getWeaponType
local Item      = getInventoryItem 
local Container = getContainer
local Armor     = getArmor

function onUse (cid ,item ,Container,Weapon,slot,armor)
if Item (cid,weapon) == true then
do AddInventoryWeapon (cid,SlotPosition ,SLOT_RIGHT,1)
end
do RemoveInventoryItem (cid ,weapon ,1)
end
do table.count (cid ,table, item)
end
return true
end
end
 
Back
Top