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?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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?