Lua - player inventory insert bug

This subforum contains all the issues which we already resolved.
wvlad
Fast Inserter
Fast Inserter
Posts: 218
Joined: Thu Jul 13, 2017 9:55 pm
Contact:

Lua - player inventory insert bug

Post by wvlad »

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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16029
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Lua - player inventory insert bug

Post by Rseding91 »

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 want to get ahold of me I'm almost always on Discord.
wvlad
Fast Inserter
Fast Inserter
Posts: 218
Joined: Thu Jul 13, 2017 9:55 pm
Contact:

Re: Lua - player inventory insert bug

Post by wvlad »

Oops, it looks like I had to use god inventory really.
Post Reply

Return to “Resolved Problems and Bugs”