#1

i have this problem
Код HTML:
public OnPlayerDateUpdateX2(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new string[1000];
  		{
		   	mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `CarLic`='%d',`CarLicA`='%d',`CarLicAT`='%d',`CarLicB`='%d',`CarLicBT`='%d'`CarLicCE`='%d',`CarLicCET`='%d',`CarLicD`='%d',`CarLicDT`='%d',`CarLicAAccord`='%d',`CarLicBAccord`='%d',`CarLicCEAccord`='%d',`CarLicDAccord`='%d',`playerColor`='%d',`FlyLic`='%d',`BoatLic`='%d',`GunLic`='%d',`Passport`='%d',`CarLicT`='%d',`FlyLicT`='%d',`BoatLicT`='%d',`GunLicT`='%d',`Rob`='%d',`Jailed`='%d',`HitT`='%d',`Muted`='%d',`MuteTime`='%d',`PassportT`='%d', WHERE `name`='%s'",
          	PlayerInfo[playerid][pCarLic],
			PlayerInfo[playerid][pCarLicA],
			PlayerInfo[playerid][pCarLicAAccord],
			PlayerInfo[playerid][pCarLicBAccord],
			PlayerInfo[playerid][pCarLicCEAccord],
			PlayerInfo[playerid][pCarLicDAccord],
			PlayerInfo[playerid][pCarLicB],
			PlayerInfo[playerid][pCarLicCE],
			PlayerInfo[playerid][pCarLicD],
			PlayerInfo[playerid][pCarLicAT],
			PlayerInfo[playerid][pCarLicBT],
			PlayerInfo[playerid][pCarLicCET],
			PlayerInfo[playerid][pCarLicDT],
			PlayerInfo[playerid][pColor],
			PlayerInfo[playerid][pFlyLic],
			PlayerInfo[playerid][pBoatLic],
			PlayerInfo[playerid][pGunLic],
			PlayerInfo[playerid][pCarLicT],
	  		PlayerInfo[playerid][pFlyLicT],
			PlayerInfo[playerid][pBoatLicT],
			PlayerInfo[playerid][pGunLicT],
			PlayerInfo[playerid][pPassport],
			PlayerInfo[playerid][pPassportT],
			PlayerInfo[playerid][pRob],
			PlayerInfo[playerid][pJailed],
			PlayerInfo[playerid][pHitT],
			PlayerInfo[playerid][pMuted],
			PlayerInfo[playerid][pMuteTime],
			PlayerInfo[playerid][pNormalName]);
  			mysql_tquery(SQL,string,"","");
		}
	}
	return 1;
}
That's errors
Код HTML:
C:\Users\Claudiu\Desktop\BlackUnion MySql\gamemodes\gm.pwn(11875) : error 075: input line too long (after substitutions)
C:\Users\Claudiu\Desktop\BlackUnion MySql\gamemodes\gm.pwn(11876) : error 037: invalid string (possibly non-terminated string)
C:\Users\Claudiu\Desktop\BlackUnion MySql\gamemodes\gm.pwn(11876) : error 017: undefined symbol "UPDATE"
C:\Users\Claudiu\Desktop\BlackUnion MySql\gamemodes\gm.pwn(11876) : error 029: invalid expression, assumed zero
C:\Users\Claudiu\Desktop\BlackUnion MySql\gamemodes\gm.pwn(11876) : fatal error 107: too many error messages on one line
Please can anybody help me?
Reply
#2

Your query is toooo long. you should make separate queries ( i'll update the reply with a fix )
Reply
#3

Here is it:
Код:
public OnPlayerDateUpdateX2(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new string[1000];
  		{
			mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `CarLic`='%d',`CarLicA`='%d',`CarLicAT`='%d',`CarLicB`='%d',`CarLicBT`='%d', WHERE `name`='%s'", 
						PlayerInfo[playerid][pCarLic], PlayerInfo[playerid][pCarLicA], PlayerInfo[playerid][pCarLicAT], PlayerInfo[playerid][pCarLicB], PlayerInfo[playerid][pCarLicBT], PlayerInfo[playerid][pNormalName]);
			mysql_tquery(SQL,string,"","");
			mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `CarLicCE`='%d',`CarLicCET`='%d',`CarLicD`='%d',`CarLicDT`='%d',`CarLicAAccord`='%d', WHERE `name`='%s'", 
						PlayerInfo[playerid][pCarLicCE], PlayerInfo[playerid][pCarLicCET], PlayerInfo[playerid][pCarLicD], PlayerInfo[playerid][pCarLicDT], PlayerInfo[playerid][pCarLicAAccord], PlayerInfo[playerid][pNormalName]);
			mysql_tquery(SQL,string,"","");
			mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `CarLicBAccord`='%d',`CarLicCEAccord`='%d',`CarLicDAccord`='%d',`playerColor`='%d',`FlyLic`='%d', WHERE `name`='%s'",
						PlayerInfo[playerid][pCarLicBAccord], PlayerInfo[playerid][pCarLicCEAccord], PlayerInfo[playerid][pCarLicDAccord], PlayerInfo[playerid][pColor], PlayerInfo[playerid][pFlyLic], PlayerInfo[playerid][pNormalName]);
			mysql_tquery(SQL,string,"","");
			mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `BoatLic`='%d',`GunLic`='%d',`Passport`='%d',`CarLicT`='%d',`FlyLicT`='%d', WHERE `name`='%s'", 
						PlayerInfo[playerid][pBoatLic], PlayerInfo[playerid][pGunLic], PlayerInfo[playerid][pPassport], PlayerInfo[playerid][pCarLicT], PlayerInfo[playerid][pFlyLicT], PlayerInfo[playerid][pNormalName]);
			mysql_tquery(SQL,string,"","");
			mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `BoatLicT`='%d',`GunLicT`='%d',`Rob`='%d',`Jailed`='%d',`HitT`='%d', WHERE `name`='%s'",
						PlayerInfo[playerid][pBoatLicT], PlayerInfo[playerid][pGunLicT], PlayerInfo[playerid][pRob], PlayerInfo[playerid][pJailed], PlayerInfo[playerid][pHitT], PlayerInfo[playerid][pNormalName]);
			mysql_tquery(SQL,string,"","");
			mysql_format(SQL,string,sizeof(string),"UPDATE `users` SET `Muted`='%d',`MuteTime`='%d',`PassportT`='%d', WHERE `name`='%s'",
						PlayerInfo[playerid][pMuted], PlayerInfo[playerid][pMuteTime], PlayerInfo[playerid][pPassportT], PlayerInfo[playerid][pNormalName]);
			mysql_tquery(SQL,string,"","");
		}
	}
	return 1;
}
Reply
#4

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)