10-22-2014, 02:16 PM
I've tried to use:
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?
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?