Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / what could cause two seemingly equal strings to test not equal?

Author
Message
dandrews
4
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 23rd Jun 2023 03:45 Edited at: 23rd Jun 2023 03:50
i know my code is a little messy but im just testing stuff and changing it constantly. my issue is that im taking a message im getting back from firebase, separating it and checking for "message" then i want to take that message and decide what to do. in the attached ss the top set is after i separated the incoming message and got whats left of the ":". the 4 is just the length of an array then below that is the actually message stripped of a few characters. the question is what could cause "message" to not be equal to "message'?

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Jun 2023 13:35 Edited at: 23rd Jun 2023 13:36
are you sure you're comparing "message" to "message"?

ie, did you ever declare teststring as string? without $, it's not, otherwise.

yes, the code is a little messy but it's also incomplete and seems pieced together which is gonna make it hard to help you further.
dandrews
4
Years of Service
User Offline
Joined: 26th Jun 2020
Location:
Posted: 23rd Jun 2023 14:36 Edited at: 23rd Jun 2023 15:17
here is a cleaned up full code, i had to replace some firebase info with "*" the last function "getlatestgamesave() isnt being used yet

edit: i add "" around the messaage ti se if theres any characters im not seeing and the first " is in the line above when printing, does this mean a possible "enter" to the next line? print(CHR(34)+getstringtoken(returndata[i],":",1)+CHR(34))
another edit: it was an enter or new line (CHR(10)) thank you for the response i spend days on a problem and as soon as i post here i find the answer anyway
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Jun 2023 15:38 Edited at: 23rd Jun 2023 15:38
seeing the data at the bottom of the screenshot led me to think there may be hidden chars since the lines break (i should have mentioned hidden chars) but i thought you may be displaying lines as Text objects with SetTextMaxWidth() in order to keep the data away from the input boxes. hence my mentioning "incomplete".

regardless, glad you found it the issue.

when you're settled, it would be great if you could post a small write-up on working with firebase to save others similar work/grief. i know i'd be interested in it

Login to post a reply

Server time is: 2024-11-21 09:38:25
Your offset time is: 2024-11-21 09:38:25