t4 refactor

This commit is contained in:
ineed bots
2025-05-21 12:41:21 -06:00
parent 3de51aa71b
commit 3e08ac900d
4 changed files with 128 additions and 121 deletions

View File

@@ -354,8 +354,13 @@ watchSaveWaypointsCommand()
println( "********* Start Bot Warfare WPDump *********" );
println( level.waypointcount );
f = BotBuiltinFileOpen( filename, "write" );
BotBuiltinFileWrite( filename, level.waypointcount + "\n", "write" );
if ( f > 0 )
{
BotBuiltinWriteLine( f, level.waypointcount );
}
for ( i = 0; i < level.waypointcount; i++ )
{
@@ -388,7 +393,16 @@ watchSaveWaypointsCommand()
str += ",";
println( str );
BotBuiltinFileWrite( filename, str + "\n", "append" );
if ( f > 0 )
{
BotBuiltinWriteLine( f, str );
}
}
if ( f > 0 )
{
BotBuiltinFileClose( f );
}
println( "\n\n\n\n\n\n" );