I have a game loop main :
here is my file.c :
I load the player from the file to begin with, if the file doesn't exist, the program executes the initialization functions on the player "get_player()" How would I go about loading a player and saving them into a bin file? ive tried everything but after the first run the program crashes, it seems the only data that is not garbage in the file is the id and xp, for testing purposes in the file.c I initialized the loaded_player pokedex and ball inventory to NULL