diff --git a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript index 1c8538867..7807f1238 100644 --- a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript @@ -499,18 +499,24 @@ function displayHelp() // (flushing the write buffer) after every write. // -log 2 overwrites any existing logfile; it also only closes // the logfile when the application shuts down. (default) - - error( - "Torque Demo command line options:\n"@ - " -log Logging behavior; see main." @ $TorqueScriptFileExtension @ " comments for details\n"@ - " -game Reset list of mods to only contain \n"@ - " Works like the -game argument\n"@ - " -dir Add to list of directories\n"@ - " -console Open a separate console\n"@ - " -jSave Record a journal\n"@ - " -jPlay Play back a journal\n"@ - " -help Display this help message\n" - ); + + %helpstring = "Torque Demo command line options:\n"; + %helpstring =%helpstring @ " -log Logging behavior; see main." @ $TorqueScriptFileExtension @ " comments for details\n"; + %helpstring =%helpstring @ " -game Reset list of mods to only contain \n"; + %helpstring =%helpstring @ " Works like the -game argument\n"; + %helpstring =%helpstring @ " -dir Add to list of directories\n"; + %helpstring =%helpstring @ " -console Open a separate console\n"; + %helpstring =%helpstring @ " -jSave Record a journal\n"; + %helpstring =%helpstring @ " -jPlay Play back a journal\n"; + %helpstring =%helpstring @ " -help Display this help message\n"; + + error(%helpstring); + + %file = new FileObject(); + if(%file.openForWrite("help.txt")) + %file.writeLine(%helpstring); + %file.close(); + %file.delete(); } // Execute startup scripts for each mod, starting at base and working up diff --git a/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript b/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript index fcff3efb9..463f98b9c 100644 --- a/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript @@ -55,7 +55,7 @@ function parseArgs() { $userDirs = $defaultGame; $dirCount = 1; - %isDedicated = true; + $isDedicated = true; }*/ switch$ ($arg) @@ -64,7 +64,7 @@ function parseArgs() case "-dedicated": $userDirs = $defaultGame; $dirCount = 1; - %isDedicated = true; + $isDedicated = true; $Server::Dedicated = true; enableWinConsole(true); $argUsed[%i]++; @@ -138,7 +138,7 @@ function parseArgs() { // Set the selected dir --NOTE: we no longer allow tools with this argument /* - if( %isDedicated ) + if( $isDedicated ) { $userDirs = $nextArg; $dirCount = 1; @@ -311,7 +311,7 @@ function parseArgs() case "-help": $displayHelp = true; $argUsed[%i]++; - + displayHelp(); //------------------- case "-compileAll": $compileAll = true; diff --git a/Templates/BaseGame/game/main.tscript.in b/Templates/BaseGame/game/main.tscript.in index 0abcb346a..0f9739b87 100644 --- a/Templates/BaseGame/game/main.tscript.in +++ b/Templates/BaseGame/game/main.tscript.in @@ -44,7 +44,7 @@ if(isFunction("loadStartup")) else { //If nothing else set a main menu, try to do so now - if(!isObject(Canvas.getContent())) + if(isObject(Canvas) || !isObject(Canvas.getContent())) { if (isObject( ProjectSettings.value("UI/mainMenuName") )) Canvas.setContent( ProjectSettings.value("UI/mainMenuName") );