i haert warchief to 0.4 and i add all system in it but when i quit stats are not save it say on console GetStats index IsReg does not exist
this is getstats
this is getstats
Code Select
function SaveStats( player )
{
try{
local id = player.ID;
if ( status[ id ].IsReg == true )
{
QuerySQL( db, "UPDATE Account SET Kills='" + status[ id ].Kills + "', Deaths='" + status[ player.ID ].Deaths + "', Cash='" + status[ id ].Cash + "', Bank='" + status[ id ].Bank + "', Joins='" + status[id].Joins + "' WHERE Name='" + player.Name.tolower() + "'" );
print( "Saved Stats of Player " + player.Name + "[" + player.ID + "]" );
status[ id ] = null;
}
}
catch(e) print( "Save Stats Error: " + e );
}