This is my first post, and please don't be rude if there's already a post on the topic, but I did some research with no result.
Let me show you a simple picture describing my problem :
![Image](https://image.noelshack.com/minis/2017/18/1493655738-capture-d-ecran-de-2017-05-01-17-14-24.png)
!!! I get an error on lines 10 and 11 if the previous ones are commented !!! Is this some bug with player_armor ?
The code used is the one from https://wiki.factorio.com/User:Gangsir/moddingTutorial . I'm a bit angry (at myself/ at code ?) because I looked over the API and found no reason for my code not to work.
Any body has suggestion ? (Ps : I get the same error without checking for character, but Apparently, defines.inventory can be nil if the player has no character, but that shouldn't be an issue for a simple item mod)
Thank you for your help !
Fumelgo