lightning_'s Forum Posts

  • нет.есть 2 плагина "лист": "кто написал" и "что написал".в них много имен а в другом много смс написанные этими пользователями.все данные в которых упоминается имя "ilya" ( то есть все смс которые написал ilyas и

    данные из "кто написал" и "что написал" идут в плагины

    "кто написал2" а смс в "что написал2"

    то есть из первой пары листов во вторую пишутся сообщения только одного определенного пользователя,все смс которые написал илья.

    а уже оттуда они переходят в текстбокс но переходят два раза почему то а мне нужно что бы 1 раз было

    On english

    no. there are 2 plug-ins "sheet": "who wrote" and "what wrote". they have a lot of names and in the other there are a lot of sms written by these users. all the data that mentions the name "ilya" (that is, all sms written by ilyas and data from "who wrote" and "what wrote" go to plugins "who wrote2" and sms in "what wrote" that is, from the first pair of sheets, messages of only one specific user are written to the second, all the SMS that Ilya wrote. and from there they go to the textbox but go twice for some reason, but I need it to be 1 time

  • friends imagine such a picture

    there are 2 list plugins on stage

    on the first name of the sender of the sms and on the second the text of the sms.

    When I press the button, the entire text of the SMS, along with the name of the sender, goes to the textbox, and there users can read their correspondence. this is how it should be

    a:hello

    b: hello who are you

    c: i am spider man

    d: an i very cool

    but I see this text that is repeated several times

    a:hello

    b: hello who are you

    c: i am spider man

    d: an i very coola: hello

    b: hello who are you

    c: i am spider man

    d: an i very cool

    If I stop the cycle, then nothing is written; if I stop after a couple of seconds, SMS is still duplicated

    or blank lines

  • There's a useful trick to the system find expression, where you do something like:

    System: find(text,"apple") ≠ -1

    Find returns the character index at which the first instance was found, but it returns -1 if nothing is found. So saying "if apple is not not found" is the same as "if apple is found". Then you do your action, like set text to "I love apples".

    Thanks you helped me a lot. Like +1

  • Friends, I need to learn how to set a condition like:

    If the textbox contains the word "apple"

    = Something will happen.and the text is something like this "Today I will buy apples and go home"

    I didn't like the expression "replace" for some reason it doesn't work in large texts

  • Not sure if I understood correctly but it looks like you want to encrypt the "a" and then decrypt back the "a"

    Maybe something like this?

    https://www.dropbox.com/s/xa9isi26qrs29z6/1-Encrypt.c3p?dl=0

    Yes, you understood correctly

  • Noticed another mistake in the "For X" loop - it should be from 0 to tokencount(..)-1

    Other than that I don't know what else can cause duplicate entries in the list. Add console logging to double check that Photon sends the correct data, and that this event only runs once.

    ок

  • There are no other places for sure. I already opened a new test project and there it was this part of my project, and there I also recorded several times

    You can try too

  • Friends, I need to see the player's ip address, how can I do this?

    I need this so that I can record his country and city in his own database of player information.

    I could not figure it out at all in the "Geolocation" plugin and it does not work when I make the condition that when the button is pressed, it will write the latitude and longitude of the player into the text.

  • Friends in my test project I wanted to try to encrypt text data using a "replace" statement.

    You write the text and press the "Submit" button.

    The text appears in the "text" plugin.

    Then when we click on the "Decrypt" button, the text from the text plugin goes to our other plugin "textbox" and it should decrypt the data from there.

    Now I'll tell you how I did it.

    You write let's say the letter "a" and it converts it to random characters and numbers. Here is an example of encryption.

    replace(Ciphertext.Text,"a","{${½g8w09eg64")

    And here is an example of decryption. It's just the reverse side of the encryption, I swapped the letter "a" and "{${½g8w09eg64"

    replace(Ciphertext.Text,"{${½g8w09eg64","a")

    Encryption works but decryption doesn't work.

    Here are the screenshots

  • 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

  • Try Construct 3

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

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