lightning_'s Recent Forum Activity

  • Friends, through the for loop, I send all usernames with "list" through photon and separate each username with the "_" character. After the user receives a list of all users, these names are added to his "list" again using the "for" loop with tokenat(event.data,loopindex,"_")

    But some names are added 2 or 3 times, that is, they will be added several times. I tried to stop the loop 0.5 seconds after the user names fit in there, but it didn’t work.

    By the way, empty elements were also added to the list, but I deleted them using the "for" loop.

  • System event, action: stop loop.

    Place it after the password checks.

    It likely fails if your name and pass checked out, and call the function, but before the function finishes, the loop perhaps checked the user in the array AFTER yours, and fires the failed function before the previous one was done.

    I interrupted the cycle and it helped. But it is necessary to break the cycle in 2 cases.

    When the user and password are found and when the user is found but the password is not found. and then everything worked great.

    And if you put it only after the password is found, then the server gave an error "user found but password is not correct".

    I advise everyone to break the cycles after their success and failure.

  • Thank you. I will definitely try and write to you. All I will do is stop the loop after checking the password

  • How can I break the cycle? and why does he fail, if his name is on the list, he must find it. and for some reason it finds and everything works well when there are less than 3 registered users

  • Friends. I have an extended chat on Photon. You can say almost like a social network.

    I made a registration room. After registration, the player can enter the "Login to your account" room. There he enters his data.

    He enters a username and password. And after clicking "Login to your account" these two values ​​​​are sent to the server for verification, that is, the username and password are separated by the "_" character

    When the server receives the code, it checks if this username exists. If not, it sends the text "Username not found". And if found, it looks at the password of this username.

    I did this using a "For" loop.

    But the thing is that if there are more than 2 or 3 registered users.

    Then I can’t log into my account. Sometimes I can and sometimes I can’t.

    I enter my data and the server says that the user is not in the list of registered users, although he is. I can’t understand the reason for 2 days, help someone who can. I’ll throw off the project itself if necessary.

    Here's what it looks like

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • It is necessary for me that I could send through raise event all lines from plug-in list to other player through photon.

    If I send it via json, will its name be changed, that is, the name of the list plugin that will receive this data. Is it possible to do this via json?

    Tagged:

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Is it possible to somehow test it in a PC so as not to mess with exporting and transfer games to android

  • Friends, for testing and in order to learn how to insert ads into my game, I created the most simple test project.

    Quickly added 2 buttons.

    Clicking the first one will show a banner.

    Pressing the second will show an interstitial ad.

    I threw the Admob plugin (by the way, I also did everything with the ultimate ads plugin).

    I put there İd of special test ads taken from Google ads. I turned on the test mode in the plugin settings.

    screenshot imgur.com/4IEltf1.

    Then I made events at the start of the room ads are loaded and when clicked they will be shown

    screenshot imgur.com/8ssF9I1.

    Here is my whole scene

    screenshot imgur.com/516AWUG

    But the ad is not shown at all. I waited for 5-10 minutes. I did the same with the UltimateAds plugin

    Maybe I'm doing something wrong somewhere?

    capx project itself can be downloaded here

    drive.google.com/file/d/1frIWxgwQY2v0ASJ4j_PRB3wt9vuVXVy5/view

  • Look into replace() function.

    Something like:

    InputText1 set text ->

    replace(InputText1.text,"_","")

    Thank you very much. You helped me a lot

lightning_'s avatar

lightning_

Member since 19 Apr, 2021

None one is following lightning_ yet!

Trophy Case

  • 3-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies