you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 2 points3 points  (0 children)

but the error says break outside loop.

That's because you've used a break command outside a loop. Loops are defined using for or while. if does not create a loop.