This site requires JavaScript, please enable it in your browser!
Greenfoot back
HELP
HELP wrote ...

2021/5/19

Counters not working

1
2
3
4
5
danpost danpost

2021/5/19

#
You would still need to declare and assign values to the uname# and pword# variables.
HELP HELP

2021/5/19

#
That will be one big line. is there a way to make one massive line multiple lines instead of one big line. I remeber there were ways of doing it in other programming languages but i can’t remeber if Java allows it.
HELP HELP

2021/5/19

#
A
danpost wrote...
You would still need to declare and assign values to the uname# and pword# variables.
So what would the code be for this?
danpost danpost

2021/5/19

#
HELP wrote...
So what would the code be for this?
What would you be comparing the user's input to?
danpost danpost

2021/5/19

#
HELP wrote...
That will be one big line. is there a way to make one massive line multiple lines instead of one big line. I remeber there were ways of doing it in other programming languages but i can’t remeber if Java allows it.
You can make boolean variables and combine them in the end. Short:
boolean b1 = username1.equals(uname1);
boolean b2 = username1.equals(uname2);
...
if (b1 || b2 !! ...)
HELP HELP

2021/5/19

#
So if i played the game and assigned variables to all of them it would work? or what
HELP HELP

2021/5/19

#
and i will use the boolean method to make the massive line shorter thanks
danpost danpost

2021/5/19

#
HELP wrote...
So if i played the game and assigned variables to all of them it would work? or what
Yes, but only for that game play. You would need to save the values externally and access them for future game play; otherwise, they will reset every time.
HELP HELP

2021/5/19

#
danpost wrote...
HELP wrote...
That will be one big line. is there a way to make one massive line multiple lines instead of one big line. I remeber there were ways of doing it in other programming languages but i can’t remeber if Java allows it.
You can make boolean variables and combine them in the end. Short:
boolean b1 = username1.equals(uname1);
boolean b2 = username1.equals(uname2);
...
if (b1 || b2 !! ...)
when you said b1 || b2 i done understand the !! ... so what would the code be if it was only up to b3
HELP HELP

2021/5/19

#
danpost wrote...
HELP wrote...
So if i played the game and assigned variables to all of them it would work? or what
Yes, but only for that game play. You would need to save the values externally and access them for future game play; otherwise, they will reset every time.
I don’t need to save it externally for this programme. It is meant to reset every time.
HELP HELP

2021/5/19

#
PLEASE HELP!!!!!!!
HELP HELP

2021/5/20

#
Wait Dan or someone. Does it count as a database if i have a class called databse that does everything the databse is meant to do as in store the variables and sort all of them?? I think it does im just checking with other though.
danpost danpost

2021/5/20

#
HELP wrote...
Wait Dan or someone. Does it count as a database if i have a class called databse that does everything the databse is meant to do as in store the variables and sort all of them?? I think it does im just checking with other though.
That sounds right.
HELP HELP

2021/5/20

#
My code didn’t save now the login button isn’t working...
HELP HELP

2021/5/20

#
it just doesn’t do anything when i click it. before it was working i just tried in the last hour or two typing what i had before out.
There are more replies on the next page.
1
2
3
4
5