I want to message the player if he score a specific score.
What I am currently using ..
if(score <= 4){
messagePlayer("You scored 1.");
} else if(score <= 19){
messagePlayer("You scored 1.");
messagePlayer("You scored 5.");
} else if(score <= 49){
messagePlayer("You scored 1.");
messagePlayer("You scored 5.");
messagePlayer("You scored 20.");
} else if(score <= 99){
messagePlayer("You scored 1.");
messagePlayer("You scored 5.");
messagePlayer("You scored 20.");
messagePlayer("You scored 50.");
} else if(score >= 100){
messagePlayer("You scored 1.");
messagePlayer("You scored 5.");
messagePlayer("You scored 20.");
messagePlayer("You scored 50.");
messagePlayer("You scored 100.");
}
The scores I want are:
- 1 Point
- 5
- 20
- 50
- 100
Is my logic 100% right and accurate? I think my first one score <= 4 is wrong, so if he gets 0 he can also get the message You scored 1. And I am not using score == x, because I need to message the player at the end, when he finish, so his highscore like 15.