Help please I've been staring at this for 6 hours and I just don't get it


So this is my code for a basic math app that gives or takes points based on whether you get a question right or not. My problem with as of right now is that when I make an account and answer a question whether right or wrong, and try to log back in with the same account it constantly gives me the error Incorrect Username or password but I know for a fact I'm typing in the right password and username. It's unlikely that it's the username because when I try to sign up with the same username the app prevents me due to the Username already exists error which makes sense. This doesn't happen if you don't answer a question though, if you simply make a username and password, log in and log out you can log right back in. No idea what in the world could be wrong please help me and happy holidays all!!!

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

MathGameScore.aia (286.1 KB)

Here's what I see being stored in CloudDB in Screen2 when questions are answer:

image

(I am using the Companion's Do It debugger)

Here's where you check the password in Screen1:


Whatever password you stored under the user name was overwritten in Screen2.

You need to change the tags used for passwords and scores to keep them separate, like
ABG/password
and
ABG/score.

I tried what you said and for some reason I could login but the score does not save at all. And im just not understanding. then when I tried fixing again you cant login at all so i'm back to square one and more lost then every. I'm back on the code I sent before. I understand what your saying I just dont understand how to code it correctly.

Here's a copy of your project, updated to add to the tags to keep score and password separate.

I added some readability for run time in the Designer

  • bigger fonts
  • textbox hint instead of prefilled text
  • textbox numbers only
  • centering
  • Corrected screen switching
  • value procedures to keep tag formats consistent
  • no more lists, just simple tag/value pairs.

MathGameScore.aia (285.7 KB)

Screen1 blocks:

Screen2 blocks:

Note: See Chapter 21 of
http://www.appinventor.org/book2
to learn about procedures.