Crafting Recipe help
#2
I've tried to use:
function Initialize(Plugin)
     	cPluginManager.AddHook(cPluginManager.HOOK_PRE_CRAFTING, OnPreCraft)

end

function OnPreCraft(Player, Grid, Recipe)
	local foundNil = false
	LOG("OPC->Reading Grid for first time")
	for x=1,3,1 do
		for y=1,3,1 do
			if Grid:GetItem(x,y) == nil then
				foundNil = true
			end
		end
	end
	LOG("OPC->Done reading Grid for first time")
end

Just that code alone produces this error:
Attempted to get an invalid item from a crafting grid: (3, 3), grid dimensions: (3, 3).

It gives it once for each location on the grid except for 2,2 where I place the first item

What am I doing wrong here?
Reply
Thanks given by:


Messages In This Thread
Crafting Recipe help - by Lokiare - 10-22-2014, 12:16 PM
RE: Crafting Recipe help - by Lokiare - 10-22-2014, 02:16 PM
RE: Crafting Recipe help - by Lokiare - 10-22-2014, 02:39 PM
RE: Crafting Recipe help - by xoft - 10-22-2014, 06:11 PM
RE: Crafting Recipe help - by xoft - 10-22-2014, 11:18 PM



Users browsing this thread: 2 Guest(s)