Lesson 12 error help

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Fredie
Posts: 2
Joined: October 29th, 2012, 2:10 am

Lesson 12 error help

Post by Fredie » October 29th, 2012, 2:18 am

Hi, I'm up to the part where you loop through all the squares to draw an X or an O and I'm getting an 'undeclared identifier' for the value of 'iy' even though I declared it as an int inside the for loop and the whole thing is inside curved brackets for the loop so it should stay declared throughout. Can anyone see where I went wrong?

Thanks
Attachments
Lesson 12 code.zip
Here's the code
(35.78 KiB) Downloaded 143 times

User avatar
XxWalKaxX
Posts: 244
Joined: June 11th, 2012, 7:15 pm

Re: Lesson 12 error help

Post by XxWalKaxX » October 29th, 2012, 6:36 am

I found your error. I'll give you a hint, its a bad spot for a semicolon.
What you call a bug...I call a new feature!

Sumit
Posts: 40
Joined: July 29th, 2012, 11:32 am

Re: Lesson 12 error help

Post by Sumit » October 29th, 2012, 8:07 am

Hi Fredie

As Walka pointed, the error is due to semicolon at the end of for loop in compose frame

Replace
for (int iy = 0; iy < 3; iy++);
with
for (int iy = 0; iy < 3; iy++)
in ComposeFrame function.
Sumit

Fredie
Posts: 2
Joined: October 29th, 2012, 2:10 am

Re: Lesson 12 error help

Post by Fredie » October 29th, 2012, 12:36 pm

Oh right! Thanks guys =)

User avatar
XxWalKaxX
Posts: 244
Joined: June 11th, 2012, 7:15 pm

Re: Lesson 12 error help

Post by XxWalKaxX » October 30th, 2012, 4:57 am

ah sumit you wasnt supposed to show exactly lol he was supposed to find it on his own
What you call a bug...I call a new feature!

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Lesson 12 error help

Post by chili » October 31st, 2012, 2:44 pm

Hehe, that's what I thought too when I read this. :lol: Glad to see you guys helpin out though.
Chili

Post Reply