Well, I did feel good untill I went on to the next part of my program. I put in about four lines and got 20 error. Well I worked at it for about 30 to 45 mins. and got the errors down to four.
That was the best I could do. I all so played around with the {}
some. I done understand what the errors are.
Here are the errors:
illegal else without matching if
error C2144: syntax error : 'char' should be preceded by ')'
error C2661: 'dbLoadObject' : no overloaded function takes 0 arguments
error C2059: syntax error : ')'
Here is the code:
#include "DarkGDK.h"
char model;
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbSync ( );
{
SetCurrentDirectory ( "media" );
dbLoadImage ("Gus 1.jpg", 1 ) ;
dbPasteImage ( 1, 400, 0 );
dbSetTextSize(38);
dbSetTextFont("Arial");
dbText(0,10,"THE");
dbText(30,60,"GUS");
dbText(50,110,"WORKS");
dbSetTextSize(22);
dbText(10,250,"This viewer will take .X,.dbo and .3ds formatt" );
dbText(10,270,"You can move around in 3D space by using the arrow keys");
dbText(10,290,"The Gus Works supply all kinds of stuff to game maker.");
dbText(10,310,"contact: rennyhampton@thegusworks.com");
dbText(10,330,"Site address is www.thegusworks.com");
dbSync ( );
dbWaitKey ();
dbCLS ();
}
//this is the bad code
{
dbinput " model name ( must be an .X or DBO like man.x or man.dbo): ",model;
if (model); == "";
{
dbMakeObjectCube (1,1);
}
else
{
dbLoadObject (char,1);
}
}
What I am trying to do is make a model viewer.
I made one in DBP and trying to convert it to dark GDK C++
I was thinking that I know hot the comm work in DBP and I can learn how to use then in C++.
I tryed to char for entering the models but it is not working right.
It is like it was in the book.
If anyone have time to look at it maybe you can start b me in the right Dir.
Thank YOU
renny
PS. In the input and else statement did I use the {} right?