Starter Kits: optionsDlg.cs bug saving config.cs ?
by Matthew Jessick · in Torque Game Engine · 05/02/2007 (10:46 am) · 0 replies
The optionsDlg.cs onSleep method in the TGE starter.fps and starter.racing mods
(e.g.: starter.fps\client\scripts\optionsDlg.cs )
may have a bug in saving the current settings into config.cs.
The correct target file should probably be starter.fps\client\config.cs.
However, because the onSleep method has:
function OptionsDlg::onSleep(%this)
{
// write out the control config into the rw/config.cs file
moveMap.save( "./client/config.cs" );
}
It actually writes the file to a place no other code (AFAIK) looks for it:
starter.fps\client\scripts\client\config.cs
This probably makes this action useless.
It also causes the otherwise unneeded folder:
starter.fps\client\scripts\client
to be created.
This is because the code above uses "./client/config.cs"
rather than "~/client/config.cs" where the tilde says: "start at the current mod folder".
I believe this works better:
function OptionsDlg::onSleep(%this)
{
// write out the control config into the rw/config.cs file
moveMap.save( "~/client/config.cs" );
}
(e.g.: starter.fps\client\scripts\optionsDlg.cs )
may have a bug in saving the current settings into config.cs.
The correct target file should probably be starter.fps\client\config.cs.
However, because the onSleep method has:
function OptionsDlg::onSleep(%this)
{
// write out the control config into the rw/config.cs file
moveMap.save( "./client/config.cs" );
}
It actually writes the file to a place no other code (AFAIK) looks for it:
starter.fps\client\scripts\client\config.cs
This probably makes this action useless.
It also causes the otherwise unneeded folder:
starter.fps\client\scripts\client
to be created.
This is because the code above uses "./client/config.cs"
rather than "~/client/config.cs" where the tilde says: "start at the current mod folder".
I believe this works better:
function OptionsDlg::onSleep(%this)
{
// write out the control config into the rw/config.cs file
moveMap.save( "~/client/config.cs" );
}