Natha wrote:I've added a check with the ItemStack.hasgrid() method, it should work nowdarkshadow1809 wrote:Workin on a new modpack and erhh
Seems Dystopia + Cursed Don't like your mod
http://prntscr.com/6vfoxh
Seems the item grid is missing an equipment grid hope it helps This seems to happen when cursed tries implementing its own armor then dystopia tries and forces an armor slot into it. And gets the upper hand. Then your mod returns this error. Mod works without either of these mods Might be wrong tho! dont judge :# i suck at lua lol I am only good at throwing stuff at it and make it work on some magical reasonCode: Select all
function hasgasmask(player) if player.getinventory(defines.inventory.playerarmor)[1] == nil then return false end local grid = player.getinventory(defines.inventory.playerarmor)[1].grid if grid == nil then return false end for _,equip in pairs(grid.equipment) do if equip.name == "gas-mask" then return true end end return false end
Thanks buddy !