Game Development Community

Main.cs (10): Unable to find function loadDir

by Stephen Sinclair · in General Discussion · 03/14/2007 (7:01 am) · 3 replies

Hi All,

I am using Torsion and created new project.

in the TGE/SDK/Examples folfer, I copied tutorial.base to a new folder called "PI". I modified the main.cs file to use "PI" file location. Then I launched torsion and setup a new project called "PI" and set the configuration to DEBUG" and pointed to the torqueDemo.exe in the examples directory. The Torsion IDE looks correct. I opened main.cs and checked to make sure the .mis file was correct and it is pointing to local data mission directory. Ok, now if I double-click the torguedemo from explorer, everything works. Loads the mission and the data. But when i try to debug in Torsion, I get the following error:

main.cs (10): Unable to find function loadDir
Illegal CodeBlock path detected (no mod directory): main.cs
exec: invalid script file name .
Illegal CodeBlock path detected (no mod directory): main.cs
exec: invalid script file name .
Illegal CodeBlock path detected (no mod directory): main.cs
exec: invalid script file name .

I am using "HEAD" as the version in Torsion configuration and I just installed TGE and verified that it works. ANy ideas on fixing this problem? Project reference setting in Torsion?

Thanks!

Steve
ps. I am a Newb. getting a rough start...but can't wait to get going!

#1
03/14/2007 (7:26 am)
LoadDir is in the base main.cs. A simple code search of the orginal code would of found this.

it sounds like you have Torsion starting TGE in the PI directory so it is running the wrong main.cs

Torsion needs to run TGE using the base main.cs. You will need to change the following line in the base main.cs.

$defaultGame = "tutorial.base";
 
to 

$defaultGame = "PI";
#2
03/14/2007 (7:37 am)
This is a question for the Torsion forum.
#3
03/14/2007 (7:50 am)
Hi, thanks for the replies. In Torsion, I made the directory change to C:\Torque\SDK\example\ in the project's properties and it found the main.cs file correctly. Seems to work fine.

Thanks for your help.

@david, thanks for the Forum Tip. I'll post over there next time with Torsion related threads.

-Steve