Data not saving!
#1

Hello guys.Im trying to get my register system working with MySql but when a player register,stats are not uploading to mysql.Connection is good with MySql,other tables works just fine.

Here is my code:

Код:
public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			new query[8000];
			strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
			format(query, sizeof(query),"INSERT INTO users  (`Username`, `Key`, `Level`, `AdminLevel`, `Band`, `PermaBand`, `Warnings`, `LogWarnings`, \
			`Disabled`, `DonateRank`, `BanAppealer`, `ShopTech`, `VehModder`, `VehNos`, `CarInsurance`, `Undercover`, `TogReports`, `Radio`, `RadioFreq`, \
			`UpgradePoints`, `ConnectedTime`) VALUES (`%s`, '%s', %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d) ",
			playername3,//1
			PlayerInfo[playerid][pKey],
			PlayerInfo[playerid][pLevel],
			PlayerInfo[playerid][pAdmin],
			PlayerInfo[playerid][pBanned],
			PlayerInfo[playerid][pPermaBanned],
			PlayerInfo[playerid][pWarns],
			PlayerInfo[playerid][pLWarns],
			PlayerInfo[playerid][pDisabled],
			PlayerInfo[playerid][pDonateRank],
			PlayerInfo[playerid][pBanAppealer],
			PlayerInfo[playerid][pShopTech],
			PlayerInfo[playerid][pVehMods],
			PlayerInfo[playerid][pNos],
			PlayerInfo[playerid][pCarInsurance],
			PlayerInfo[playerid][pUndercover],
			PlayerInfo[playerid][pTogReports],
			PlayerInfo[playerid][pRadio],
			PlayerInfo[playerid][pRadioFreq],
			PlayerInfo[playerid][gPupgrade],
			PlayerInfo[playerid][pConnectTime]);//21
			mysql_query(query, THREAD_REGISTER);
	}
	return 1;
}
Function "onplayerregister" gets called since it shows me the registering process.
Any help please?
Thanks
Reply
#2

Bump!
Reply
#3

Go to mysql_log.txt and look for this query, there will be an error.
Reply
#4

Quote:
Originally Posted by Zamek
Посмотреть сообщение
Go to mysql_log.txt and look for this query, there will be an error.
There is nothing showed about this query on mysql_log!Why is that happening?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)