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 / dbObjectLoad doesnt work

Author
Message
fedora718
15
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 25th Oct 2008 21:30
I'm running through the Dark GDK tutorials, and on the 3D objects tutorial it tells me to use dbObjectLoad or dbLoadObject. When i give it the name of the .X file that comes with it, it just hangs. i've made sure it's spelled correctly and i dont get any compile time errors. Has anyone seen this before?
Tav
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location:
Posted: 26th Oct 2008 03:04
Please post your code ^^
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 26th Oct 2008 11:05
where has the file been stored? I must be in your project folder, not debug or anything else.
fedora718
15
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 26th Oct 2008 22:00
this is my code:



it hangs on the line dbLoadObject ("Colonel-X.X", 1 );

Colonel-X.X is in the same file as main.cpp and the solution file. i've tried other .x files and the same thing happens with them.
Venge
18
Years of Service
User Offline
Joined: 13th Sep 2006
Location: Iowa
Posted: 26th Oct 2008 23:18
You need a dbSync() before the return, otherwise it won't update.

I have CDO. It's like OCD, but the letters are in alphabetical order, like they should be.
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 27th Oct 2008 16:57
Explain hangs? does it trigger a breakpoint? otherwise how do you know that its on that line?
fedora718
15
Years of Service
User Offline
Joined: 25th Oct 2008
Location:
Posted: 27th Oct 2008 17:03 Edited at: 27th Oct 2008 19:24
it hangs on that line because i put in a dbText line before and after. it doesnt display the second one. it could be the sync isure though. i'll look into it.

update:
i put breakpoints in every line and it hangs on exactly that line

here's my new code:
#include "DarkGDK.h"
void DarkGDK ( void )
{

dbSyncOn ( );
dbSyncRate ( 60 );
dbText(0,0,"Test1");
dbSync ();
dbLoadObject ( "Colonel-X.X", 1 );
dbText(0,15, "Test2");

dbSync ( );

return;
}
Orac
18
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 31st Oct 2008 11:17
The code you posted won't compile on my system. You need to have a loop in there. Also the order in which you display stuff is important. This code compiles and works fine on my system :-


Make doubly sure you've spelt the name of the file correctly, no errors are reported if GDK can't find it.

There are only 10 types of people in the world.
Those who understand binary, and those who don't.

Login to post a reply

Server time is: 2024-09-30 09:26:55
Your offset time is: 2024-09-30 09:26:55