Lua - player inventory insert bug
Lua - player inventory insert bug
The function game.player.get_inventory(defines.inventory.player_main).insert doesn't insert any item (with name and count specified) to empty inventory but game.player.insert works. It may be related to that my quickbar is full.
Re: Lua - player inventory insert bug
Are you sure you're not using the wrong defines? Do you have a player attached or are you using the god controller?
If you're using the god controller you need to use defines.inventory.god_main
If you're using the god controller you need to use defines.inventory.god_main
If you want to get ahold of me I'm almost always on Discord.
Re: Lua - player inventory insert bug
Oops, it looks like I had to use god inventory really.