[solved] How do I create a leaderboard with google spreadsheets and get requests?

Hi there!
I’m a little new to gdevelop. So I want to ask you for some help.

What do I want to achieve:
I want to make a game with an online highscore.
The game will send the scores of the player to google spreadsheet and reads the data.
The data will be translated into a leaderboard.

What do I have already achieved:
Script for spreadsheets: http://community.stencyl.com/index.php?topic=51126.0
This approach works fine, after adding a doPost() function. I can post to spreadsheet and see the leaderboard in the sheet.

What didn’t work:
I’ve found that the GET and POST methods should be able to fill a variable.
But I’ve tried both variants and never find input in the variable, which was called in the request action.

So: How do I get the data from the script back to the game?
(I use return states like in the stencyl example. Calling just the link represent a webpage with a single line of JSON)
Is this a problem of using google script instead of php? How can we solve this issue?

Thanks for reading and your time!
wolkilula

1 Like

i’m interested in this too. I managed to do a get to a php which writes to MySQL, but can’t read :sob:

1 Like

Hey xisco,
I found out something!

I hope, this brings us to the solution:
The response in my variable is nothing in the test environment.
But after building the game as html5: the variable is holding the response!

Now I will try to prosess this input data and than test it in the build version of the game.

Best of luck for us :yum:

1 Like

wolkilula do you mind posting the google script code that worked for you along with the gdevelop code??? I am trying to do the same and i have small luck till now…

1 Like

Can you please share your solution? I am stuck in this processing