igortyhon's Forum Posts

  • In fact, things are different from what I had understood.....

    Maybe you should find someone to solve this problem for you, I'm sure that any API has documentation and an example of how to use it, not the pieces you give here.

    Perhaps there is a colleague who is free now, I don't have time to solve your problem. I thought some general advice would help, but I see that in this case someone needs to sit down and do the work.

  • I have a question about how to work with returns. How do I check if the message is equal to SUCCESS so that I can send the second POST?

    Посмотрите, содержат ли полученные данные необходимые ключи, и если да, разберите их.

    Construct3 имеет множество системных функций для разбора текста.

    EDITED:

    In your example you used URL as URL instead of the http address. Is this a variable that is not declared with the others?

    It's just a variable containing the address, you can insert a string with the site address.

  • I don't know how to help anymore, you just need to put together a small template and try it until you succeed.

  • Just to see if I'm on the right track. I took this example from another post.

    I'd have to include the data and then send the post as shown, right?

    Hi. Yes you are on the right track, you have collected all the data you need into a json object and you are passing this object. After that the server should send you a response like this. (status1msgSUCCESSlaunch_urlhttp://google.com)

    The question remains whether the data in this object looks the way the server expects it to look or not.

    But I'm doing it easier, I'm just like on the screen.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's quite simple, you constantly send a POST request with a string in the string and put the data as they require. The only thing is that you will need to format this string with data correctly (quotation marks or brackets, etc).

    You should get a response and this response will contain a string with data in the format they specify. You parse this string into the data you need via tokenat.

    And so constantly, of course in the code you need to provide for communication failures and errors, so that you do not spam them with requests too often otherwise they at the server level will block you.

    I have attached a screenshot with a piece of code for the POST request and response, this is an example data you should enter your own.

  • Hi. If it is not a secret it would be better to say which API you want to pull.

    I think the response will be higher.

    For example, I can't give lessons, but if I've worked with such an API, I'll share an example.

  • You can just send data by collecting it in a string, that's how I used to do it.

    The screen shows the POST request and the server script.

    Nowadays I would suggest encrypting the data before sending and storing it on the server in encrypted form. But it will do for an example.

  • Hi. It takes too long to explain, you haven't even learned how to use an array.

    You can pass an array structure or just collect it into a list and parse it after receiving it via tokenat.

    But all of this is a bad idea, storing player data on your server in a database is a bad idea, once the players are more than 100 thousand begin huge problems.

    I advise you to use ready-made solutions, such as firebase, here is an example.

    kibaga.org/c3-example/file_uploads/index.php

  • Perfect, thanks for your help!

    Since I’ll need to work a lot with arrays, JSON, and databases in general, do you have any recommendations for tutorials or resources to improve my knowledge? Thanks again!

    You can see the description of actions and values for all required objects in the engine, it helps a lot. I also read the help and look at examples.

    There are many experienced colleagues on the forum, they always try to help.

  • Yes it doesn't work within variables, so you have to split into multiple variables, but that's a hassle.

    I have another suggestion for you, all these dialogs can be stored in an array and the hyphenation is saved there, I made an example for you.

    File *.c3p

  • I think I should have made and posted my own version right away, rather than writing all these posts.

  • -The text is bold because you have 60 text objects being created every second and overlaid on top of each other. You can see it in the debugger.

    -You can also see what is in the array after sorting in the debugger.

    -Action 2 is executed 60 times per second and so is action 4.

  • Thank you for your suggestion! However, in most sports leaderboards, it's uncommon to see the points listed before the team names.

    I understand that sorting by points as the first column might simplify things technically, but I’m trying to maintain the traditional layout where team names appear first. If you have any ideas on how to achieve that, I’d greatly appreciate it!

    Thanks again for your input! 😊

    How the data is stored in the array is not hardwired to how you output it.

    You can of course continue to use your order and sort it manually, for example by bubble.

    But it is more logical to sort by the built-in method and when outputting the results just output the first team name from cell 1 and the result from cell 0.

  • It is more logical to put the team points in the first cell and sort by the built-in sort command.