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 / Why won't this code work?

Author
Message
Dragon slayer
17
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 29th Dec 2012 17:37
This code is the Getting started tutorial for DarkGDK I copied it into VC++ 2008 and it does not work.I did type copy it first and it did not work so I selected it out of the PDF copied it and pasted it into VC++ and it still does not work.

Here are the errors I get.

error C2001: newline in constant
error C2146: syntax error : missing ')' before identifier 'dbSprite'
error C2660: 'dbCreateAnimatedSprite' : function does not take 2 arguments

Here is the code



Like I said this code is selected and copied directly from the PDF and still does not work.

Thanks for any help!
Dragonslayer
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 29th Dec 2012 17:43 Edited at: 29th Dec 2012 21:40
EDIT: BAD ADVICE THIS!!!



One error can cause loads in C/C++.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Dragon slayer
17
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 29th Dec 2012 18:07
Ok I fixed that but am still getting the same errors
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 29th Dec 2012 19:36
What is this:


The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 29th Dec 2012 21:23 Edited at: 29th Dec 2012 21:24
@WLGfx
That was the worst advise I've ever seen... its the condition for a loop, so by adding an endline would make the loop useless..

I'm with Hawkblood, try deleting and rewriting (manually) this line:


Because -> " <- and -> ” <- are different.

Heres the fixed code:


Ventures of the worlds around us are limited only by our imagination.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 29th Dec 2012 21:40 Edited at: 29th Dec 2012 21:41
I didn't recognise the dodgy quote in there until it was pointed out... he he

And I feel dumb. (was dropping off when I first read it...) SOWWY!!!

EDIT: I've edited that first post of mine... (And I'm spending 10 minutes with a D on my hat)

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Dragon slayer
17
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 29th Dec 2012 23:45
Ok I will delete the endline and rewrite the line manually and see what happens.

This is copied right out of the tutorial PDF so maybe that is wrong.
Dragon slayer
17
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 29th Dec 2012 23:53
Ok I typed this code in and it worked great. Thanks!

Login to post a reply

Server time is: 2024-03-29 15:57:03
Your offset time is: 2024-03-29 15:57:03