Hi! and i am having a problem with lesson 8

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
laxbrostudmuffin
Posts: 2
Joined: July 5th, 2012, 4:23 pm

Hi! and i am having a problem with lesson 8

Post by laxbrostudmuffin » July 5th, 2012, 4:31 pm

Hi everyone i am new here and honestly im new at programming in general! but i love chili and these tutorials so far. basically my reason for posting is a problem i ran into in lesson 8. when he explains how to incorporate draw reticles so you dont have to make a set of pixels every time i run into an error. i made the Game::DrawReticle in the game.h file but when i put in the game.cpp file right where he explained to i get an error that says "Error: member function "Game::DrawReticle" may not be redeclared outside its class" any tips on what i did wrong? i dont have my code because it is all messed up at the moment because ive been trying to fix it. Thank You!!!!

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Hi! and i am having a problem with lesson 8

Post by LuX » July 5th, 2012, 6:42 pm

I hope you didn't literally write "Game::DrawReticle" to Game.h

In case you did it correctly, I suspect you put a ";" at the end of the "void Game::DrawReticle(*variables*); {}" which you shouldn't, instead just "void Game::DrawReticle(*variables*) {}"

But read the "READ THIS FIRST!" post, with what font and color does that post need to be written that people read it?
ʕ •ᴥ•ʔ

laxbrostudmuffin
Posts: 2
Joined: July 5th, 2012, 4:23 pm

Re: Hi! and i am having a problem with lesson 8

Post by laxbrostudmuffin » July 5th, 2012, 11:54 pm

yeah i literally wrote that exactly.... haha sorry im completely new at this. but this fixed the problem! thank you for the fast reply it was much appreciated! i never realized how much a semi colon could mess things up.... but yes i read the beginning of the read this first but not all of it and i have already read over it again. thank you LuX!

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

Re: Hi! and i am having a problem with lesson 8

Post by XxWalKaxX » July 9th, 2012, 11:52 pm

semicolons will get you every time just missing one will mess everything up
What you call a bug...I call a new feature!

User avatar
ocunder
Posts: 11
Joined: July 11th, 2012, 3:19 am

Re: Hi! and i am having a problem with lesson 8

Post by ocunder » July 12th, 2012, 7:27 am

I can help you, do you still need help?

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

Re: Hi! and i am having a problem with lesson 8

Post by chili » July 12th, 2012, 10:21 am

I think this one's been solved ocunder. ;)
Chili

User avatar
ocunder
Posts: 11
Joined: July 11th, 2012, 3:19 am

Re: Hi! and i am having a problem with lesson 8

Post by ocunder » July 12th, 2012, 10:44 am

chili wrote:I think this one's been solved ocunder. ;)
oh ok!

Post Reply