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 / Please Help

Author
Message
Cyrus Mortis
16
Years of Service
User Offline
Joined: 13th Jul 2008
Location:
Posted: 13th Jul 2008 11:16
hi im new to C++ and im doin the firtst tutorial but i keep getting this message everytime i try to debug:
Unhandled exception at 0x6604a92f in Dark GDK - Game1.exe: 0xC0000005: Access violation reading location 0x0cd6b000.


here is all the code i used

#include \"DarkGDK.h\"

// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );

dbLoadImage ( \"animatedsprite.png\", 1 );
dbSprite ( 1, 0, 0, 1 );

// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}

// return back to windows
return;
}
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 13th Jul 2008 12:46
Have a closer look at this line of your code:
dbLoadImage ( \"animatedsprite.png\", 1 );

What are you trying to achieve with the Back slashes?
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 13th Jul 2008 17:30 Edited at: 13th Jul 2008 17:33
Just a test:

dbLoadImage ( "animatedsprite.png", 1 );


EDIT: It looks to be working fine for me.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 13th Jul 2008 18:00
Assuming that :
#include \"DarkGDK.h\"

is actually:
#include "DarkGDK.h"


And Assuming :
dbLoadImage ( \"animatedsprite.png\", 1 );

is actually:
dbLoadImage ( "animatedsprite.png", 1 );

Then the code compiles and runs on my machine with no errors.

Login to post a reply

Server time is: 2024-09-30 01:27:30
Your offset time is: 2024-09-30 01:27:30