Hey! raylib forum is closing!

After a year with not much movement in the forum I decided to close it.

The cost of maintaining the hosting is a bit high for the usage of the platform, updating the forum and managing it is also a bit cumbersome and the truth is that I'm already trying to maintain multiple other networks pretty more active than this forum.

I'll recommend you to move to the other raylib networks:

- For a forum style, use Reddit: https://www.reddit.com/r/raylib/
- For direct messaging and questions, use Discord: https://discord.gg/VkzNHUE
- To report issues, use GitHub: https://github.com/raysan5/raylib

- Also, remember you can contact me personally on Twitter: https://twitter.com/raysan5 or directly by mail to ray[at]raylib.com

If you feel generous, you can also contribute to the project on my Patreon: https://www.patreon.com/raylib

Thanks to you all for joining the project and help to improve it with your questions. Keep it up! :)

Best Regards,

Ray

PD. Closing will be effective by October 31th.

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;
SetTargetFPS(60);

while (!WindowShouldClose())
{

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

EndDrawing();

}


CloseWindow();

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:

Comments

Sign In or Register to comment.