Persistent storage management

i wanted to make a inventory for the player in my game (hopefully il post it here soon :D) and i got stuck on how to save things to data files i made (coped most of it from the starter example ) this

#include "raylib.h"
typedef enum { STORAGE_SCORE=5, STORAGE_HISCORE } StorageData;
int main()

int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
int score=STORAGE_SCORE;

while (!WindowShouldClose())

StorageSaveValue(STORAGE_SCORE, score);
DrawText(FormatText("score: %i", score), 160, 200, 50, RED); //text




return 0;

problem is if i remove the "=5" from "typedef enum { STORAGE_SCORE=5, STORAGE_HISCORE } StorageData;"
the STORAGE_SCORE will be rested to 0

what im i doing wrong?
thank you for the help in advance and sorry for my bad English D:


Sign In or Register to comment.