Game Development Community

Dedicated server in VCpp 2005

by olly · in Torque Game Engine · 11/13/2006 (12:08 am) · 3 replies

Hy there,

i'm new to this forum and work for a project of the fraunhofer called Virtual eXperience Prototyping[http://vxp.fit.fraunhofer.de/]. i have managed to compile the hello world tut in vcpp2005. with that as a base i had build a client/host system with ogre, where one of the clients was simply the server. so far so good. i had to set some compiler flags, some environment variables and so on. but now, i want to write a dedicated server system. my base code is the TNL_Test on the documentation page.
ok, i know that tnl isn't ready for vcpp2005 because of the compiler, but i hope that someone can help me anyhow. the errors are

//--- error ---
error C2143: syntax error : missing ';' before '*'
//--- error ---

that seems to be an inline problem, cause i don't think, that someone had forgotten to set a ';' at the end of a class

//--- error ---
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
//--- error ---

:-) there is a type identifier...and it's no int!! both errors point to this line

//--- error ---
VxpServerGame *vxpServerGame = NULL;
//--- error ---

the class is existing, reachable and at the beginning of the header file. i have tripple checked my code. there is no syntax error in it. the errors point to the tnl code.

my include code follows. i have commented/unkommented all permutations ;-)

//--- code ---
#include
#include "stdafx.h"
//#include "tnlSymmetricCipher.h"
#include "tnlAsymmetricKey.h"
//#include "tnlCertificate.h"
//#include "tnlBitStream.h"
#include "tnl.h"
//#include "tnlNetBase.h"
//#include "tnlGhostConnection.h"
#include "tnlNetInterface.h"
//#include "tnlNetObject.h"
//#include "tnlLog.h"
//#include "tnlRPC.h"
//#include "tnlString.h"
//--- code ---

About the author

Recent Threads


#1
11/13/2006 (12:13 am)
And SORRY for the tripple thread... don't know what happend.. :-/
#2
12/14/2006 (11:59 pm)
I had similar errors that may be unrelated, but here's what I learned from them. When I've been working on the code some times I'd compile and get the int assumed error and the other. In my case it was because I forgot to put

using namespace TNL;

above my class so the tnl classes ended up not being defined... I'd have to assume that your VxpServerGame class is coming up as not defined if the errors point to it. I notice you don't have a #include "VxpServerGame.h" in your includes, but you might have left that out or defined it inside that file. Looking at your post date you've probably found a solution by now but I thought I'd post just in case.
#3
02/07/2007 (9:07 pm)
You have a line of code ABOVE the 'stdafx.h' include, that means that stdio.h is NOT included in your build.

I believe you need a namespace declaration before including the files, but I haven't been in torque code regularly for a while now (that's about to change :D)... just C++ for too many years not to remind you of that little 'quirk' of Microsoft's compilers.

And yes, if you are inheriting from something in the TNL namespace, the complier may well accuse you of 'missing a semi' because the base class is not resolvable.

Sometimes, when there's a lot of 'overhead' in making a file (namespaces, etc), I copy an existing file up to the class definition, this keeps me focused on IMPORTANT code, not niggling little complier issues/engine issues..