• 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 This script. I getting errors. Help please.

Dalale

GX
Joined
Jun 13, 2008
Messages
718
Reaction score
2
Location
Sweden
Code:
local config = {
-- actionID = { price, backpackID, itemID, itemTYPE, itemCount }
	[21008] = { 20020, 2003, 2273, 100, 20 },
	[21007] = { 20020, 2003, 2293, 45, 20 },
	[21010] = { 300020, 2003, 2305, 35, 20 },
	[21000] = { 40020, 2003, 2268, 100, 20 },
	[21002] = { 200020, 2003, 2278, 2, 20 },
	[21001] = { 20020, 2001, 2298, 50, 20 }
}

function onUse(cid, item)
	for k, v in pairs(config) do
		if item.actionid == k then
			if doPlayerRemoveMoney(cid, v[1]) == TRUE then
	local container = doPlayerAddItem(cid, v[2], 1)
				for i = 1, v[5] do
					doAddContainerItem(container, v[3], v[4])
				end
			else
				doPlayerSendCancel(cid, "Not enough gold. You need "..v[1].." gold.")
			end
		end
	end
	return TRUE
end

Here is the errors

Code:
[10/02/2009  17:45:56] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:56] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:56] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:56] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:56] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:56] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:56] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:56] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:57] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:57] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:57] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:57] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:57] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:57] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:58] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:58] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:58] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:58] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:58] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:58] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:58] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:59] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:59] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:59] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:59] Lua Script Error: [Action Interface] 
[10/02/2009  17:45:59] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:45:59] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:45:59] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:00] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:00] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:00] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:00] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:00] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:00] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:01] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:01] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:01] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:01] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:01] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:01] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:01] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:02] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:02] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:02] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:02] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:02] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:02] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:03] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:03] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:03] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:03] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:03] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:03] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:04] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:04] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:04] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:04] luaDoAddContainerItem(). Could not add item

[10/02/2009  17:46:04] Lua Script Error: [Action Interface] 
[10/02/2009  17:46:04] data/actions/scripts/tools/leverrune.lua:onUse

[10/02/2009  17:46:04] luaDoAddContainerItem(). Could not add item

Help me please.
This is freeze hole my server.<_<
 
You should add a doPlayerSendCancel(cid, "blahbalhblahbla") for if the player doesn't have the amount of capacity or space..
 
doAddContainerItem(uid, itemid[, count/subtype])

So I guess you should add (cid)

Rep++ if worked.

Thanks anyway =)

You should add a doPlayerSendCancel(cid, "blahbalhblahbla") for if the player doesn't have the amount of capacity or space..

@ Zoriath
I dont know how to fix it, could you please do it?
Im noob on lua

--
Thanks everyone for fast replies
 
Back
Top