dumb newbie simple loading problem
by Dion Bailey · in Torque Game Engine · 03/13/2003 (10:56 am) · 11 replies
Ive created two new scripts, ive put them in the script folder under server, plus incuded them in the game.cs file
However i cant get them to compile. I tryed loading up the console and typing the exec command, but still no joy. Can anyone help?
However i cant get them to compile. I tryed loading up the console and typing the exec command, but still no joy. Can anyone help?
About the author
#2
03/13/2003 (11:04 am)
What are the errors in the console/log file? We need more information to help you.
#3
03/13/2003 (11:13 am)
thats the weird thing, I can see any errors. I run the engine from the command line an add -console, i then wait to see the errors by doing the ~ when the mission is loaded, but nothing, its like the files arent even there. I just see the normal stuff like loading compiled script fps/.......
#4
03/13/2003 (11:19 am)
Not sure if this is it - but make sure if there are .dso files that they are writeable.
#5
03/13/2003 (11:25 am)
Ah good one Keith I have had that happen before :)
#6
I have also made sure that the files and the folder are all writable and not read only.
could one of you describe how you would load a script that you created then maybe i can see what im doing wrong.
I was following the tutorials from the documentation (animation, triggers, collision) if that helps at all
03/13/2003 (11:41 am)
No dso files at all. just for the scripts which are already there.I have also made sure that the files and the folder are all writable and not read only.
could one of you describe how you would load a script that you created then maybe i can see what im doing wrong.
I was following the tutorials from the documentation (animation, triggers, collision) if that helps at all
#7
function onServerCreated()
{
// Server::GameType is sent to the master server.
// This variable should uniquely identify your game and/or mod.
$Server::GameType = "Test App";
// Server::MissionType sent to the master server. Clients can
// filter servers based on mission type.
$Server::MissionType = "Deathmatch";
// GameStartTime is the sim time the game started. Used to calculated
// game elapsed time.
$Game::StartTime = 0;
// Load up all datablocks, objects etc. This function is called when
// a server is constructed.
exec("./audioProfiles.cs");
exec("./camera.cs");
exec("./markers.cs");
//exec("./triggers.cs");
exec("./inventory.cs");
exec("./shapeBase.cs");
exec("./item.cs");
exec("./staticShape.cs");
exec("./health.cs");
exec("./weapon.cs");
exec("./radiusDamage.cs");
exec("./rifle.cs");
exec("./crossbow.cs");
exec("./player.cs");
exec("./aiPlayer.cs");
exec("c:/torque/example/fps/server/scripts/Flagpole.cs");
exec("./tutorial1.cs");
// Keep track of when the game started
$Game::StartTime = $Sim::Time;
}
I actualy deleted all the exec commands above to see what happend and it all still loaded.
on the console I entered
exec("fps/server/scripts/Flagpole.cs");
but it says file missing even though the file is in the directory
03/13/2003 (12:19 pm)
this is where i have the exec in the game.csfunction onServerCreated()
{
// Server::GameType is sent to the master server.
// This variable should uniquely identify your game and/or mod.
$Server::GameType = "Test App";
// Server::MissionType sent to the master server. Clients can
// filter servers based on mission type.
$Server::MissionType = "Deathmatch";
// GameStartTime is the sim time the game started. Used to calculated
// game elapsed time.
$Game::StartTime = 0;
// Load up all datablocks, objects etc. This function is called when
// a server is constructed.
exec("./audioProfiles.cs");
exec("./camera.cs");
exec("./markers.cs");
//exec("./triggers.cs");
exec("./inventory.cs");
exec("./shapeBase.cs");
exec("./item.cs");
exec("./staticShape.cs");
exec("./health.cs");
exec("./weapon.cs");
exec("./radiusDamage.cs");
exec("./rifle.cs");
exec("./crossbow.cs");
exec("./player.cs");
exec("./aiPlayer.cs");
exec("c:/torque/example/fps/server/scripts/Flagpole.cs");
exec("./tutorial1.cs");
// Keep track of when the game started
$Game::StartTime = $Sim::Time;
}
I actualy deleted all the exec commands above to see what happend and it all still loaded.
on the console I entered
exec("fps/server/scripts/Flagpole.cs");
but it says file missing even though the file is in the directory
#8
03/13/2003 (12:32 pm)
The file name may be case sensitive. Not sure about that, but it might be something to check.
#9
If not try deleteing the game.dso then see if it works.
This will force it to compile a new game.dso with your changes, at runtime.
03/13/2003 (12:43 pm)
Of course you have deleted the old game.dso so the altered game.cs will compile the game.dso with the new exe commands?If not try deleteing the game.dso then see if it works.
This will force it to compile a new game.dso with your changes, at runtime.
#10
03/13/2003 (3:27 pm)
Vivian you were spot on, thanks for everybodys advice.
#11
03/13/2003 (3:31 pm)
Yeah, if there are any syntax errors in a .cs file, it will automatically bypass it and use the .dso file. It won't give you any warnings.
Torque 3D Owner Michael Cozzolino
Big Monk Games