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 / stupid code error

Author
Message
mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 13th Jun 2009 13:17

when i start the game i just get an error

www.madninjas.co.nr we are mad and we are ninjas
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 13th Jun 2009 13:56
What is the error?

mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 13th Jun 2009 14:05
error 6

www.madninjas.co.nr we are mad and we are ninjas
mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 13th Jun 2009 23:54
does anyone know what's wrong?

www.madninjas.co.nr we are mad and we are ninjas
Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 13th Jun 2009 23:59
You'll have to be more descriptive than 'error 6' ><

heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 14th Jun 2009 00:17 Edited at: 14th Jun 2009 00:17
Well you are assigning two images to the same image number:
Quote: "dbLoadImage ("texture.jpg",1);
dbLoadImage ("detail.jpg",1);"

I don't know if that is a legal coding action in Dark GDK but doesn't seem like it would be.

Phosphoer
16
Years of Service
User Offline
Joined: 8th Dec 2007
Location: Seattle
Posted: 14th Jun 2009 03:13
I believe that DarkGDK doesn't catch that, you just end up with the last thing you loaded into image 1, but could be wrong.

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 14th Jun 2009 04:16 Edited at: 14th Jun 2009 04:20
Welcome to the cryptic world of GDK/DBP error messages.

The logical course of action is to comment out all non essential code, just leave a bare minimum of code in there, maybe print something to the screen so that you know it's running. Then just uncomment chunks of code, build and run if you don't get an error it's nothing to do with that code, repeat until the source of the error is found.

EDIT: Just used the *search button* at the bottom of the page, and found >>> this <<<.

01100001 01101110 01101111 01110100 01101000 01100101 01110010
01110000 01101111 01101001 01101110 01110100 01101100 01100101 01110011
01110011 01110011 01101001 01100111
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 14th Jun 2009 04:29 Edited at: 14th Jun 2009 04:31
You may want to make sure that an image ID actually exists (an image getting loaded) before trying to use that ID .

Things like:

Quote: "dbSetTerrainTexture ( 1, 1, 2 );"


uses texture ID of 1 and of 2.
Texture ID of 2 does not even exist as your code does not create it.

Check every ID that you use in the code, and make sure you actually have created it.
mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 14th Jun 2009 10:07

error 3

www.madninjas.co.nr we are mad and we are ninjas
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 14th Jun 2009 11:16
*search button*

Your problem lies in the fact that you are calling dbMakeObjectTerrain ( 1 ); with an index of one, and then using an index of three for the rest of the AT commands.

01100001 01101110 01101111 01110100 01101000 01100101 01110010
01110000 01101111 01101001 01101110 01110100 01101100 01100101 01110011
01110011 01110011 01101001 01100111
mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 14th Jun 2009 12:39

error 6

www.madninjas.co.nr we are mad and we are ninjas
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 14th Jun 2009 13:00 Edited at: 14th Jun 2009 13:07
Maybe the textures aren't in the working directory.

Just try this:



01100001 01101110 01101111 01110100 01101000 01100101 01110010
01110000 01101111 01101001 01101110 01110100 01101100 01100101 01110011
01110011 01110011 01101001 01100111
mike5424
15
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 14th Jun 2009 18:08
what directory do they have to go in?

www.madninjas.co.nr we are mad and we are ninjas
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 14th Jun 2009 18:25 Edited at: 14th Jun 2009 18:27
Did the code above produce a message box telling you that the files weren't accessible?

What I normally do is create a directory called bin in the root folder of my solution directory, and this is where I place all of my necessary media, DLLs, config files etc. Then if you right click on the project icon (in the solution explorer) and select properties, then in the General tab I think, you can specify the working directory and the output directory, set both to the newly created bin directory (do this for all builds i.e. debug and release). Now whenever you compile your project it will create the executable in that directory, and the default working directory will be the bin folder.

You can check what the current working directory is by using dbGetDir( ); this will return a char* with the absolute path, so just display it on screen using dbText or a message box.

01100001 01101110 01101111 01110100 01101000 01100101 01110010
01110000 01101111 01101001 01101110 01110100 01101100 01100101 01110011
01110011 01110011 01101001 01100111

Login to post a reply

Server time is: 2024-11-25 08:49:32
Your offset time is: 2024-11-25 08:49:32