GameJolt Game Maker API Example
By thatbrod - Added On 7/19/2012
Current Major Vesion: 2
Launch Quick Play to see it in action!
Download to study the library!
Find the full documentation here! http://pastebin.com/ZhJVEQgs
GOOD LUCK! :D
Show Less
Show More
Leaderboards
You May Also Like
4.25k
Views
1.33k
Plays
Game News
-
Small update
Posted On 3/6/2013 -
Update 2.1
Posted On 11/13/2012 -
Game Maker's GJAPI Has Updated to v2.0!
Posted On 11/12/2012 -
Video Tutorial uploaded!
Posted On 9/27/2012 -
Update to v1.3.1
Posted On 8/18/2012


And whenever I try to run your example, the game crashes...
(I have Game Maker 8)
COMPILATION ERROR in Script: GJ_HTTP_callNew
Error in code at line 48:
md5_begin(); md5_read_string(url + string(_GJ_pKey)); md5_end();
^
at position 6: Unknown function or script: md5_begin
___________________________________________
ERROR in
action number 1
of Mouse Event for Left Released
for object oLOGin:
In script GJ_login:
In script GJ_HTTP_callNew:
Illegal argument count calling script "GJ_getUserData".
Script requires 3 arguments, 2 have been supplied.
I read that this was an error because of gm8.1 but if that so how it's working correctly in your example? (Not the "quick play" one here). I downloaded it and open it up in gm8.1 the file called "GameJolt Game Maker API Example v2.1.gmk" and there i logged in correctly, but when i tried it in my game it throws that error :S
Before when you didn't supply an argument, GM would automatically assume it was 0, but now it demands you give it to the script no matter what. I thought I had fixed all of those errors, but I'll have to look through again
For now, you can fix this temporarily by adding a "0" as the final argument in the script GJ_HTTP_callNew()'s calling of GJ_getUserData() (and everywhere else an error like this one is thrown)
I'll have this fixed up later today :(
I think i found another way to fix it. In your example in Global Game Settings/Errors you have "Throw an error argument aren't initialised correctly" unchecked and that option is on by default in any new .gm81 file.
I tried cheking on in your example and then got the same error/s.
So i think if i just uncheck that in my game it should work correctly. I'll try right now.
I used this as is:
GJ_addScore(<real> tableID, <string> scoreDisplay, <real> scoreSort, <string> extraData)
But dunno why i got only the word "points" showing on the highscores. Also i set the HS to only one value per user but i saw around 5 values sent by me...
Deleted those values and tried to send again and this time no data was sent, i really can't understand that :(
And the other strange bug is about the data storage. I didn't test the global one yet but the user. And it didn't work, tried doing a save/load system. And i get this:
-I start playing
-Save the game
if GJ_isLogged() {
GJ_saveData("level",(global.level+1)); // Save the next level
GJ_saveData("score",global.scr); // Save the score
}
-Then return to title and try to load the game
-It works.
BUT
-If i leave the game
-Reload it again and try to load after logging in it returns the default/error value.
I'm not sure if this is my error or api's because if i try the quick play in here, and go to "STATS", Gameplays (personal) only returns "Loading..."
What's wrong? :S
PS. I tried adding you to skype brod for this but got no answer xD
If you want to show the actual score on your highscore list, you have to do something like:
addScore(0, string(myScore) + " points!", myScore, "");
For the loading global storage things, make sure that GJ_getStatus() returns successful before using them
(PS. No hurry but i left one question to you on skype ^^)
If you have it, post any errors and I'll post some fixes
_GJ_control = object_add();
object_add() is not reconised
im getting error "script name lerp is equal to function name"
but what do i have to do and i cant find that function anybody help? :(
COMPILATION ERROR in Script: GJ_instructions
Error in code at line 201:
GJ_freeUserSet();
^
at position 6: Unknown function or script: GJ_freeUserSet
Theres a Tutorial or example just for Trophies APi somewhere?
"___________________________________________
COMPILATION ERROR in Script: GJ_instructions
Error in code at line 201:
GJ_freeUserSet();
^
at position 6: Unknown function or script: GJ_freeUserSet"