string playerstats_last;
string events_last;
.float playerstats_addedglobalinfo;
-float playerstats_requested;
.string playerstats_id;
+float playerstats_sendtry;
void PlayerStats_Init()
{
string e, en;
string nn, tt;
string s;
+ float n;
switch(status)
{
case URL_READY_ERROR:
default:
print("Player stats writing failed: ", ftos(status), "\n");
+ ++playerstats_sendtry;
+ n = tokenize_console(autocvar_g_playerstats_uri);
+ if(playerstats_sendtry < n)
+ {
+ print("Trying next URL...\n");
+ url_fopen(argv(playerstats_sendtry), FILE_APPEND, PlayerStats_ready, world);
+ return;
+ }
+ print("Failed permanently.\n");
playerstats_waitforme = TRUE;
if(playerstats_db >= 0)
{
//#NO AUTOCVARS START
void PlayerStats_Shutdown()
{
- string uri;
+ float n;
if(playerstats_db < 0)
return;
- uri = autocvar_g_playerstats_uri;
- if(uri != "")
+ playerstats_sendtry = 0;
+ n = tokenize_console(autocvar_g_playerstats_uri);
+ if(n > 0)
{
playerstats_waitforme = FALSE;
- url_fopen(uri, FILE_APPEND, PlayerStats_ready, world);
+ url_fopen(argv(0), FILE_APPEND, PlayerStats_ready, world);
}
else
{