GM Library

Forum Listing » Game Achievements Forum » View Topic

  • Alright, I finally got around to re-making this library. I completely recoded all of the functions using NetRead instead of 39dll this time. I didn't include a demo game this time because this one is extremely easy to use (in my opinion). 

    All I did was upload the .gml file of scripts you just have to download, open Game Maker, click Scripts > Import scripts and find the file.

    Each function has a parameter and return list which should get you on your way, aswell.

    You can find the file: http://gamejolt.com/open-source/games/other/gm-achievement-example/1264/

    NOTE: Every parameter must be a string. 

    EDIT: Added GJ_data_check_key() so you can easily check if a key exists.

    Last edited on July 18, 2010 - 11:08 AM by UnknownGamer

  • This looks amazing, I'm going to get working right away! :D

  • This is Going to make games alot more worth playing on this site!


    Last edited on December 20, 2009 - 06:32 PM by GarlicGuy

  • From your explanation it looks to work fairly simple. Kudos to UG. :D

    I'mma make a little game.

    OMG!

  • Yo Cros!

    I can't get it to log me in!

     it keeps giving me an array error! and I barley use arrays... -_-


  • Jolly good

  • Hey Sean. Would you maybe be able to post your code, so we could all see what may be causing it?

  • I didnt make my own code yet, I was using the example

    when I put in my 'token' its shows this error message:

    ___________________________________________
    ERROR in
    action number 1
    of Mouse Event for Left Button
    for object Obj_Login:

    In script auth_user:
    Error in code at line 70:
         logged_in = string_array[1];

    at position 16: Unknown variable string_array or array index out of bounds

    It for some reason wont authorize the user.

    Is it because the GM API example isnt on the site?

    Last edited on December 20, 2009 - 10:12 PM by GarlicGuy

  • I get the same error as Sean.

  • I get that same error as well when I use the GJ.gmk example. I'm going to try another computer, but it'll probably give the same result.

    When I try to use it for a game I created though, I get a "Unable to Connect" message box. (It is the first error message that the auth_user function can return). Like with the first one, I'm going to try another computer. It may be a firewall issue?

    I also fumbled with the array's initialization, trying a few different ways. I tried

    string_array[999] = -1
    for(i=0;i<1000;i+=1) string_array[i] = -1

    and that didn't do anything to help, and I'm not even sure what string_array is for. It just gave another error message box that happens down the road, but wasn't the same as Sean gave. I'm not sure what it was, but I'm going to look when I get a chance.


    Last edited on December 21, 2009 - 09:08 AM by rotten_tater

  • Sorry guys. UG coded it up, and he's on vacation. I think it's still using the staging server, which would be the cause for all this stuff. If you wanted to search for where it says, "staging.gamejolt.com" and change it to just be "gamejolt.com" instead, that'll probably fix it. You'll also have to use your Game ID / Private Key / Trophy ID, since the game he was testing with is not available on the main server.

    He should be coming back tonight, I believe.

    Last edited on December 21, 2009 - 09:50 AM by CROS

  • hmm. I still get the "Unable to Connect" message (with my own game) after getting rid of the 'staging' part.
  • UG will be back at around 5am Tuesday (GMT), so I guess we'll have to wait for him...

  • I just wanted to let everyone know that I am back and that I updated the first post with the new version of the GM API.

  • Yesss ! it works!!

    Now I can continue my development! welcome back UG!!

People Online