How save the score

:smiley: Hello people. I wish to know how to save the score of a player in a txt/exel or in a server, please step by step I am new. :frowning:
I know that I asked before in other posts, but I think that I was not clear in what I was asking, so I am posting it again.


If you’d like to save the score of a player in a file you should use xml files.
Add an event, add an action, storage, write a value.

File: “”
Group : “Score”
Expression: Variable(score)

A new file will be created ( and will contain the score of your player !
Enjoy !!

Best regards.

Thx man :smiley: , it worked! But only in native platform, what do you suggest me for html5? :question:

Storage actions are compatible with HTML games.
No real files will be created: they will be saved into the browser storage. :slight_smile:

So when I close the browser, the files will disappear. What should I do to store that files permanently in the pc, so that are safe and will not be deleted?
I used the adress C:\Program Files\Game Develop \Score exp \ for storing the files but it didn’t worked.

Webstorage are permanent storages, data are kept even if you close the web browser. And, because it’s webstorage, it’s not real files, so you will not be able to see the file on your computer.

Then how I do to access and save my data , or better I keep it in a server? :question:

You access them using the normal actions in Game Develop (and you can see them using the dev tools of your webbrowser).

Thanks for responding :slight_smile: . I am trying to save data in a local host; in GD I use the option “Send a request to a web page” and filled the following information:
Server: localhost
Path to page: “/conexion.php”
Request body content:
The data I want to save. I used lots of commands as:
INSERT INTO database.table (Score) VALUES (‘20’);
Method: “POST”
But this doesn’t save the data. What am I doing wrong? :confused:

how do you load the highscore

Basically, you send a GET request to a PHP script that returns a XML document (instead of a classic webpage).

thank you.

do you know if scores can be saved on preview mode. i mean when i refresh the webpage it goes back to 0. do i need to compile it to test the event out?