I think that the best way would be to put all struct instances into a linked list, to easily iterate through them and make sure that all items are saved.

About the items on the ground - those entities got the address of an RPGItem instance, and that address might not be valid after a game_load. Another option is to remove the RPGItem-instance when an item is dropped on the ground, and then store the item stats in the skills of the entity (and then re-create the RPGItem instance when the item is picked up).

However, it would be very nice if struct-instances in Lite-C was saved automatically - I'll suggest that in the "The Future" forum smile

Last edited by Claus_N; 07/31/09 10:27.