lightning_'s Recent Forum Activity

  • Thanks to. I have been a member of this group for a long time. But why can’t you use a cycle in a cycle. As I understand it, the for cycle in a cycle where the cycle of the first action can already be completed and stop the "stop loop", then the second one will work without problems. problems arise, again based on my experience, as I understand it, if the first cycle does not end and the second one starts to work, then they intersect.

    And also I want to add that the photon did not send repeated data several times. I understood this by the fact that I output data from the variable into the text into which this data received from the photon "list of all people" was actually recorded

  • There are many elements in my 'list', but there are some of them several times and I need something under one instance so that they do not repeat

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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

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