Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

I need help with backwoods leave it to the cleaver

for some reason code combat will not let me use else or if else.

Are you using Programmaticon I or Programmaticon II?

i have been using ii

in order to use an else conditional statement, the else has to be aligned with a previous if conditional statement.

i already tride if else also.

What exactly does the error message say?

it says else must be paired with an if but when i try that it doesn’t work

look at my picture i tride it see

It saying precisely what I was saying. The problem is in line 9.
if-else
Line 9 should be an if conditional statement.

i know but then it says to use else and attack

Yes, it does. Do that and it will work.

yes but my problem is it won’t let me use if else

Where did you learn to write, “if else” ??? The proper syntax is either “else” all by itself or use “elif” for “else if” statements.

oooooooh i must have gotten it wrong i think you might have fixed my problem i’ll go and check one second

nope did not work but you know the little sugestgon bar that pops up while your typing thats where it says if else and thats wherer i got that.

Please post your corrected code so we can see where we are now.

here it is 36%20AM

Line 8 is supposed to be an if conditional statement. Also, line 11 should just be an else statement, not elif.

okay i know what to do now on line 11 but how do i make a condional statement ???

It’s called a conditional statement because if the conditions are true then do something. If this, then do that. You have to check to see IF the hero.isReady to cleave before commanding to cleave.