stats not actually updating.
#1

~removed.~
Reply
#2

No, we don't know what's causing it. Would you like to give us some more information to work with other than "it's broken, please help me fix it"?

Have you checked to make sure your queries are actually successful?
Reply
#3

~removed.~
Reply
#4

nvm, I just seen what I was missing.
Reply
#5

Код:
new query[2500], total, tick = GetTickCount();
	total		= (tick - Player[playerid][playerLogged]) / 1000; // Convert into seconds
	format(query, sizeof(query), "UPDATE `txp` SET");
	format(query, sizeof(query), "%s where `id` = '%d'", query, Player[playerid][pID]);
	format(query, sizeof(query), "%s `score` = '%d',", query, Player[playerid][playerScore]);
	format(query, sizeof(query), "%s `kill` = '%d',", query, Player[playerid][playerKills]);
	format(query, sizeof(query), "%s `death` = '%d',", query, Player[playerid][playerDeaths]);
	format(query, sizeof(query), "%s `money` = '%d',", query, Player[playerid][playerMoney]);
	format(query, sizeof(query), "%s `lastlogged` = now(),", query);
	format(query, sizeof(query), "%s `loggedtime` = `loggedtime` + %d,", query, total);
	format(query, sizeof(query), "%s `skin` = '%d',", query, Player[playerid][playerSkin]);
	format(query, sizeof(query), "%s `level` = '%d',", query, Player[playerid][playerLevel]);
	format(query, sizeof(query), "%s `spawn` = '%d',", query, Player[playerid][houseSpawn]);
	format(query, sizeof(query), "%s `token` = '%d',", query, Player[playerid][playerToken]);
	format(query, sizeof(query), "%s `icecream` = '%d',", query, Player[playerid][icecreams]);
	format(query, sizeof(query), "%s `cookies` = '%d',", query, Player[playerid][cookies]);
	format(query, sizeof(query), "%s `color` = '%d'", query, Player[playerid][pc]);
	printf("%d", total);
	Player[playerid][playerLogged] = GetTickCount();
	mysql_format(koneksi, query, sizeof(query), "%s", query);
	mysql_query(koneksi, query, false);
	return 1;
Missing commas (i marked them with red color).
And you should add "where" statement so it will not update all players data.
Reply
#6

~removed.~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)