TGEA 1.7.0 Beta 1 Bug - package system rewrite
by Kirk Longendyke · in Torque Game Engine Advanced · 03/28/2008 (11:35 am) · 2 replies
Couple bugs here to be aware of:
1- the system now no longer is capable of recognizing root-derived directories as valid. testcase used was:
result was inability to find saves/save01.cs
resolution for that was (in main.cs):
Furthemore, at time of writing, removing the tools directory pretty much shattered functionality entirely, seeming to no longer be capable of even finding the normal scriptsAndAssets directory.
1- the system now no longer is capable of recognizing root-derived directories as valid. testcase used was:
new simobject(progress)
{
stats[xp] = 0;
};
function SaveProgress()
{
progress.save("saves/save01.cs");
}
function LoadProgress()
{
exec("saves/save01.cs");
}result was inability to find saves/save01.cs
resolution for that was (in main.cs):
$userDirs = "tools;" @ "saves;" @ $defaultGame;similar code:
$userDirs = "tools;" @ $defaultGame @ "saves;" ;broke horribly.
Furthemore, at time of writing, removing the tools directory pretty much shattered functionality entirely, seeming to no longer be capable of even finding the normal scriptsAndAssets directory.
#2
have to be
in order to work? That semi-colon would be pretty important.
I'm not seeing anywhere in the engine code that filters modPaths by having a main.cs or not. If you can find that for meI would be happy to look into it.
There is definitely something odd going on with progress.save("~/saves/save01.cs"); when I run it from the console.
One thing that TGB brought to the table for Juggernaut and TGEA 1.7 was a much more strict resolution of ~. Instead of resolving to $defaultGame it should be resolving to whatever modPath the script is being executed from. More than likely, when you execute SaveProgress from your root folder (like out of main.cs) it isn't able to resolve a "script path" and you get the ~ directory instead. If you were to move this down to scriptsAndAssets/main.cs I suspect it would start working (I haven't tested).
Alternatively, you could just use something like this:
03/31/2008 (1:37 pm)
Wouldn't this$userDirs = "tools;" @ $defaultGame @ "saves;" ;
have to be
$userDirs = "tools;" @ $defaultGame @ "[b];[/b]saves;" ;
in order to work? That semi-colon would be pretty important.
I'm not seeing anywhere in the engine code that filters modPaths by having a main.cs or not. If you can find that for meI would be happy to look into it.
There is definitely something odd going on with progress.save("~/saves/save01.cs"); when I run it from the console.
One thing that TGB brought to the table for Juggernaut and TGEA 1.7 was a much more strict resolution of ~. Instead of resolving to $defaultGame it should be resolving to whatever modPath the script is being executed from. More than likely, when you execute SaveProgress from your root folder (like out of main.cs) it isn't able to resolve a "script path" and you get the ~ directory instead. If you were to move this down to scriptsAndAssets/main.cs I suspect it would start working (I haven't tested).
Alternatively, you could just use something like this:
function SaveProgress()
{
progress.save($defaultGame @ "/saves/save01.cs");
}
Torque Owner Kirk Longendyke
well... this ones gotten worse, now...
first up, the engines now trying to hunt down main.cs files, and when it doesn't, killing off the directory from it's lookup...
in addition to *that* one, and not entirely sure this one shouldn't be a seperate ticket, but:
the above write proceedure still functions but alternates such as
function SaveProgress() { progress.save("~/saves/save01.cs"); }to simply say &*(^% it and refference the file via the scriptsAndAssets tree actually generates a
~/saves/ directory now...