+ 2
Why will this code not work in SoloLearn.
I know that this is a very long code and I am sorry. I made two levels in my rock paper scissors game and it worked great. But when I added a third level I get a compilation error. The code compiles, however, in an IDE I used. What must I adjust to make it work in SoloLearn? P.S. To save you some time, focus on the parts of the code that say levelThree, or levelThreeLogic, because they are what I added. The code was too long to post in here so I will make the actual code public so you can see it in Code Playground. It will be called "Rock Paper Scissors Under Construction!" Thanks in advance.
8 odpowiedzi
+ 2
the error is simple when you write nested if else you had to write
if(condition){
abc
}else{
if(condition){
abc
}
}
but you wrote it
if(condition){
}else if(condition){
...}
+ 2
@Sandeep that would give me the opposite effect and it worked for all the other levels. thank u for looking at it though
+ 2
Idk but it'd be way to difficult to change it on my phone
+ 1
I'm looking into the code right now.
You're welcome! *in advance.
+ 1
I have to say quite long, thought it stopped at a 100 lines, then it just loaded another 200. Well I'll port it to my laptop and analyze it from, let you know when I'm done.
Meantime
//JENN SAYS HI.
+ 1
thank you for taking time to help me :) ( I know the code is like 400 lines but its easier for me to understand the code because i wrote it and I didnt get around to commenting it out yet)
+ 1
I'll keep at it. this one is really evasive
+ 1
works now