Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Not sure why it is doing this....

Author
Message
MindTrixz
14
Years of Service
User Offline
Joined: 22nd Sep 2010
Location:
Posted: 28th Oct 2010 02:02


Ok so I am attempting to say that if the x coordinate is less than 200 than once I let go of the space key and left key the sprite moving will simply return towards its original position until at an increment of 5 pixels. But i keep get an error:

c:\users\kyle severns\desktop\dark gdk - 2d game1\dark gdk - 2d game1\lol.cpp(62) : error C2181: illegal else without matching if

any help would be appreciated.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 28th Oct 2010 02:38
Quote: "if(x<=200);"

There's a semi colon

MindTrixz
14
Years of Service
User Offline
Joined: 22nd Sep 2010
Location:
Posted: 28th Oct 2010 03:17
thanks man I didnt even see it...lol
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 28th Oct 2010 04:11
yeah no semi colons in if statemeants unless your putting a command in them. ex:


Always program as if the person maintaining your program is a psychopath that knows where you live
MindTrixz
14
Years of Service
User Offline
Joined: 22nd Sep 2010
Location:
Posted: 28th Oct 2010 07:43
thanks guys I cant believe I didnt see that lol

Login to post a reply

Server time is: 2024-09-28 16:35:49
Your offset time is: 2024-09-28 16:35:49