[SOLVED]Need help changing starting items for mod
Posted: Thu Sep 26, 2019 2:40 pm
Hello modders, i would like to change my starting items in my mod. I found a thread about this but it is 6 years old and would like to see if anyone can help me with this. So far i know i need a control.lua. This is what i have so far.
character.removeitem{name="iron-plate", count=40} -- remove 40 iron plates from the character, or less if character doesn't have 40
character.removeitem{name="coal", count=character.getitemcount("coal")} -- remove all coal from the character
but im getting this error after i try to create the game. not on launch.
control.lua:1: attempt to index global 'character' (a nil value) stack traceback:
character.removeitem{name="iron-plate", count=40} -- remove 40 iron plates from the character, or less if character doesn't have 40
character.removeitem{name="coal", count=character.getitemcount("coal")} -- remove all coal from the character
but im getting this error after i try to create the game. not on launch.
control.lua:1: attempt to index global 'character' (a nil value) stack traceback: