Game Development Community

LoadDir("") -- setting up development game directory>?

by Keith Mc Dowell JR · in Torque Game Engine · 07/19/2007 (4:00 pm) · 1 replies

Hey,

I think, I might have place this one in the wrong SDK forum.. But, running into a problem with setting up my development directory. The loadDir(""); complains that it can not be found and then exec("./") can not find the /default.cs in their respective diretories. Below is my sample game directory.

I have my development directories setup like this:

I have the package set to game
activePackage(game)

--------------------------directory ----------------------------
gametitlefolder
/ game
./client
../ui
./server
./data
-> inside /game/main.cs --handles the rest..
game.exe
main.cs --> inside here is one variable $defaultGame="game" ; assuming this is the reference to the game directory
-----------------------------------------------------------------------
Using Torque IDE:
When debugging

loadDir("game"); in main.cs -- found in /game/main.cs
--it says that " Unable to find function loadDir "

and my reference calls in /game/main.cs
exec("./client/default.cs"); -- illegal command can not find (mod) directory
exec("./server/default.cs");

-- remove ./ reference
exec("./client/default.cs"); -- missing default.cs in both directories.
exec("./server/default.cs");

Any suggestions would be awesome !
Thanks,

#1
07/19/2007 (5:18 pm)
LoadDir is a function defined in the example's root main.cs

function loadDir(%dir)
{
   setModPaths(pushback($userMods, %dir, ";"));
   exec(%dir @ "/main.cs");
}