Asset - Extension WebAPI

Discussion in 'Marketplace' started by The-any-Key, May 22, 2017.

  1. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,521
    After some more checks it seem that this is actually a Game maker bug. Tested to get the data via browser and it works fine. But GM refuse to get the data.
     
  2. dawidM

    dawidM Member

    Joined:
    Jun 18, 2017
    Posts:
    19
    Thank you for your reply.The thing with .htaccess sounds good but it seems to be a bit complicated, but I will definitely try it soon. I am also going to buy this string compress asset, I hope it will help. For example, I noticed that my JSON string has unnecessary '0's , like : { "variable1: "1340.000000", "variable2: "1180.000000", "variable3: "2340.000000" } etc. It shouldn't generate additional zeros when it is an integer. I hope this asset wil help.

    Yes, this is some serious bug, it should be fixed in the next update, especially since more and more people create multiplayer games with GMS. @Nocturne , could you please address this bug to YoYo programmers? Thank you in advance and have a great day to both you guys.

    Regards,
    dawidM
     
  3. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,465
    It's generating extra zeros because it isn't a true integer. If you convert those values with int64() beforehand, those trailing zeroes disappear. Compression is just a matter of automatically shorthanding a piece of text, when it unpacks the zeros are all still there if you don't eliminate them at the source.
    If you have a genuine bug, you file it on the helpdesk with a reproducible example. Nocturne isn't responsible for that.

    Besides, it's also YOUR job to prove that it isn't the fault of something else, such as missing CORS headers or host-side hotlinking protection. I see both of these a lot with people who report so-called "bugs" on the HTML5 export.
     
  4. Genuflex

    Genuflex Member

    Joined:
    Jun 24, 2019
    Posts:
    7
    Hello The-any-Key,

    I would like to use highscore tables for daily score evaluation, so the tables should be cleared (truncate) or deleted (drop) and created again. I think the easiest way is modifying the
    "setupDB_UsersHighscore" function. But I am not good in PHP and the Scripts have to many variables for PHP-Beginner.

    For Dropping, it could be something like this: $query = "DROP TABLE `".$highscore_table."` ";
    But it seems, that is not a complete solution. Could you help please?

    EDIT: I solved it!
     
    Last edited: Jul 19, 2019
  5. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,521
    Note that you need to manually do this for everyday. Or make your computer call this clear function each day. As most hosts are passive and you can't make it do the call for you.

    You could in theory make a check each time a user view or post a highscore. So any highscore that has another creation date than the current database time should be removed. But this calls for some PHP knowledge.
     
  6. Genuflex

    Genuflex Member

    Joined:
    Jun 24, 2019
    Posts:
    7
    In GM are some time functions and you can set UTC for all players, so I solved it without PHP.

    If you can see I use many functions of your Software. Now I want to use "Save Var" for some global values. In GM Text mod it works fine, like always. But in HTML5 it is a pain...
    Google Chrome console is showing this error in your demo when I login and try to save global var in html5 module: Uncaught TypeError: Cannot read property 'slice' of undefined
    The new value is saved, but the game crashes and you must reload the page

    I'm not sure if I can fix this alone, but I can bypass it with a placeholder account for global variables like you mentioned on your website
     
    Last edited: Jul 25, 2019
  7. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,521
    Sounds like an internal error in the HTML5 export module. I think "slice" is used to split strings in JavaScript. And if there is a type error I guess it try slice a number or object that can not be sliced.
     
  8. RyanC

    RyanC Member

    Joined:
    Jun 24, 2016
    Posts:
    373

    Hi, Just purchased the asset and been taking a look.

    This seems very well organised, however I couldn't find any documentation explaining what the functions are used for? The notes in the scripts seem vague.

    I would like for my users to be able to store (string data for levels) and access each others to play them.

    In the demo it can save a string in slot (column) 1 and 2 but perhaps I should be using the scoreboard to do this, otherwise how will the column increment when a user uploads a new string each time.

    Just wondering if someone can steer me in the right direction with regards to the right functions to use, so I can get started?
     
  9. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,521
    Hi.
    The asset can be used to store user information. They can also share data with others with the share column. You can also make users share number tables to ex save how many users played a specific game/level..

    if you looking for a solution to share user generated levels you need a custom job as the asset is not designed to handle that.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice