Game Development Community

Having a problem with the console...

by James Urquhart · in Torque Game Engine · 07/14/2002 (4:03 am) · 5 replies

I've been meddling about trying to create a program using torque's default classes...
(I copied & heavily modified the game/main.cc code)

I've got it partially working (the main loop starts), but i am confused as to why the main.cs script doesn't appear to be called....

In the main.cs script, i have it calling
enableWinConsole(true);

However, the console isn't enabled(the text one), and all i essentially get is nothing. (No "%" to tell me the console is on)

If i manually call the enable console function, e.g via :
stdConsole->enable(true);
It comes on, but it doesn't work(naturally)... keeps saying "eval : unknown command".

If i use the console object, and force it to execute :
Con::executef(1, "enableWinConsole(true);");

It still doesn't enable the console.

It seems the enableWinConsole() function isn't being registered... have i missed a vital include/function somewhere? or is it something else?

(I'm utilizing the engine via the engine lib file)
And if your wondering, i have left the code in to call the main.cs :p

Thanks for your help

--------

Can anyone help?

#1
07/15/2002 (5:14 am)
The problem is the scripting language doesnt work if you link the engine. I'm not really sure why there is a engine lib project in VC++ unless its wishful thinking. You have to compile all the code in the same project. Defiant and I tried a setup like what your trying but couldnt get it to work.

-Tim aka Spock
#2
07/15/2002 (9:08 am)
Thanks tim... I'll have to add the engine stuff to my makefile now :p

I'm hoping to get a simple commandline app going that can make tcp/udp sockets so i can make some form of client/server in torque without the 3d graphics or the game stuff.
#3
07/15/2002 (11:24 am)
I finally got the console working...
For some strange reason, the quit() command doesn't work properly, even if it is recognised, but i have an idea why =)

Oh well... at least it works ^_^
#4
07/15/2002 (1:18 pm)
Another question...

Where is the define DEDICATED defined? i can't find it anywhere.
I believe that stops the engine using the x11 server, which it seems to be doing atm. Is this true?

Thanks again
#5
07/15/2002 (5:26 pm)
The dedicated only build is linux only. There is no dedicated build for Win32/Mac (is there demand for this?).

The main reason to use dedicated on linux is that it doesn't require any third party or client libs to compile.

DEDICATED is defined in the targets.torque.mk makefile. To do a dedicated build, do "make clean; make dedicated". (The make clean is important to make sure that the unix platform object files are removed before rebuilding the server).