#include #include typedef struct { int hp; } stats; void loadSavedGame(char *name, stats *player) { /* FILE *game; char *filename; filename = malloc(10 + sizeof(name)); (sprintf(filename, "savedgames/%s",name); if((name = fopen(filename,"r")) == NULL) { printf("You don't have a saved game under that name.\n"); exit(1); // will replace this later, it's not important right now } free(filename); */ player->hp = 119; printf("worked %i\n",player->hp); } main() { char boo[10] = "oorza"; stats playeer, *player; player = &playeer; loadSavedGame(boo, player); printf("%i\n",player->hp); }