Struct problem

For my game i am using struct variable that contains all info about items(Weapon, armor, etc). And when i change or add new variable to struct all info that is set to actor is defaulted to 0. I searched info and found out that this is issue since i was born.

So is there a better way to handle info for game items so info don’t get lost after some changes?

Make a data table. It is basically a “database” of objects which inherits the form of the struct that you have created. Each row of the data table will then be related to one of your assets. Considering all of your items are using the same struct.

Can you show how you’re using the struct to store the defaults?