3 Replies - 174 Views - Last Post: 16 January 2013 - 05:35 PM Rate Topic: -----

#1 _RossTheBoss_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-January 13

I'm creating a program that lets the user select between 1 of 6 lo

Posted 16 January 2013 - 05:26 PM

So the program I'm running starts of with 6 loops. each loop is inside of its own if/else if statement. I am getting an error that says 'if' without 'else'. Does this mean I just need to put an else statement at the end the maybe says something like "invalid entry" or something?? I think this is correct if not please help. Thank you in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: I'm creating a program that lets the user select between 1 of 6 lo

#2 natecat  Icon User is offline

  • D.I.C Head

Reputation: 53
  • View blog
  • Posts: 225
  • Joined: 19-December 11

Re: I'm creating a program that lets the user select between 1 of 6 lo

Posted 16 January 2013 - 05:29 PM

Make sure there isn't a bracket before the if statement, else it will expect it to be an else for that last if statement.
Was This Post Helpful? 1
  • +
  • -

#3 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2198
  • View blog
  • Posts: 5,226
  • Joined: 10-September 10

Re: I'm creating a program that lets the user select between 1 of 6 lo

Posted 16 January 2013 - 05:30 PM

Are you sure the error is "if without else," because that's not an error?
Was This Post Helpful? 0
  • +
  • -

#4 _RossTheBoss_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 16-January 13

Re: I'm creating a program that lets the user select between 1 of 6 lo

Posted 16 January 2013 - 05:35 PM

View Postnatecat, on 16 January 2013 - 05:29 PM, said:

Make sure there isn't a bracket before the if statement, else it will expect it to be an else for that last if statement.


Ok thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1