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 / Sample code problem

Author
Message
SandiTheNoob
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 25th Mar 2011 23:47
Hello guys.
I discoverd DarkGDK a few days ago, great API, like it more than i like SFML.
But, ofcourse, i got stuck. So i followed this youtube tutorial: http://www.youtube.com/watch?v=cVLyQgzXKUg&feature=related
And I did everything in the first part, loading the sprite. But, all i get is a black window.
So this is the code: http://www.box.net/shared/qcq0cj5ji7
Can you people help me?
And, yes, I do have a player.bmp in my project folder.
DeadTomGC
13
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 26th Mar 2011 04:48 Edited at: 26th Mar 2011 04:51
Oh there's your problem! in your loop you have "dbSync;" I don't know why you didn't get a compiler error. void dbSync( void ) is a method. You should have "dbSync();" Your screen was not updating.

Btw, why not attach the file to your post?

Oh, and somebody else will probably tell you this if I don't.
Try to put as much info about your question in the title of the post as possible because that is all the search engine will access.

SandiTheNoob
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 26th Mar 2011 20:28
Oh thank you very much!
You saved me. I really dont get why the compiler didnt say it was an error.
I dont know why i didnt use attachments, i guess i just didnt remember.
And i will try to write more specific titles in the future.

One more thing. Could you maybe tell me, are these that im watching tutorials good? Is there anything better?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Mar 2011 03:16
The tutorials you get with GDK are pretty good, they should be installed on your machine:

The Game Creators->Dark GDK->Tutorials

Gook luck.

Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 27th Mar 2011 13:04
I can explain why you didn't get a compiler error for missing the parentheses in dbSync(): because a function name, without the brackets and arguments, is a valid expression which returns the address of the function. You can use the address to make function pointers.

The compiler doesn't care whether you use the returned value of an expression or not. For example, if you write only the name of a variable in one line, that's valid too, even if it doesn't have any logical sense.

Login to post a reply

Server time is: 2024-06-22 11:35:07
Your offset time is: 2024-06-22 11:35:07