0 votes
by (160 points)
Hi all,

I´m trying to know in how many steps the players finish the game so is there a way to receive that variable information from the game?

Also that would help me creating a Hall of Fame by tracking the best ones.

I am a complete noob at this but I already figured out how to do everything for my game, just this question remains unsolved for it to become a reality.

Many thanks in advance!

1 Answer

0 votes
by (8.6k points)
The short answer is "Yes."

The slightly longer answer, code example included, depends on your server setup. What does the API which you want to use to collect the data looks like, exactly?
by (160 points)
That´s the problem... I don´t have a clue...

I´m just using Sugarcube and some code I find across this site that suits my needs.

From where should I start so that I can answer your questions? How can I see the "API" you mentioned?

Thanks for the help!
by (160 points)

From my server info I could retrieve they use XML-API API1 & API2

Hope this helps...

by (8.6k points)
None of those links are accessible to me. I only get "page doesn't exist or you don't have permissions to view it" error pages.
by (160 points)
by (8.6k points)

That's your server's administrative API. You categorically don't want anyone else to access it, ever.

What you need to do is to define and develop your own API on your server and tell us how to use it to send the results, so we can help you with the SugarCube side of things. This API can be as simple as a small PHP page which expects the user name and the score in $_POST and writes it into some database.

...