Why will this code not work in SoloLearn. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

9th Dec 2016, 7:16 PM
NICKALL [EP]
NICKALL [EP] - avatar
8 Answers
+ 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){ ...}
10th Dec 2016, 7:11 AM
Sandeep Chatterjee
+ 2
@Sandeep that would give me the opposite effect and it worked for all the other levels. thank u for looking at it though
10th Dec 2016, 1:11 PM
NICKALL [EP]
NICKALL [EP] - avatar
+ 2
Idk but it'd be way to difficult to change it on my phone
10th Dec 2016, 2:52 PM
NICKALL [EP]
NICKALL [EP] - avatar
+ 1
I'm looking into the code right now. You're welcome! *in advance.
9th Dec 2016, 7:49 PM
JENN
JENN - avatar
+ 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.
9th Dec 2016, 7:53 PM
JENN
JENN - avatar
+ 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)
9th Dec 2016, 8:08 PM
NICKALL [EP]
NICKALL [EP] - avatar
+ 1
I'll keep at it. this one is really evasive
10th Dec 2016, 2:54 PM
NICKALL [EP]
NICKALL [EP] - avatar
+ 1
works now
11th Dec 2016, 3:21 PM
NICKALL [EP]
NICKALL [EP] - avatar