[Fixed]MySQL Saving Errors -
Mini` - 08.08.2010
I'm just curious, what can be done better with this, and how do I fix the errors?
Код:
if(!PlayerLogged[playerid])
return 0;
CheckMySQL();
new string[1312];
format(string, sizeof(string), "UPDATE Users SET Key='%s',Level='%d',AdminLevel='%d',DonateRank='%d',Registered='%ad',Sex='%d',Age='%d',Experience='%d',Money='%d',Bank='%d',Skin='%d',Drugs='%d',Materils='%d',Job='%d',PlayingHours='%d',AllowedPayday='%d',Paycheck='%d',Faction='%d',Rank='%d',HouseKey='%d',BizKey='%d',SpawnPoint='%d',Banned='%d',Warnings='%d',CarLic='%d',FlyLic='%d',WepLic='%d',PhoneNumber='%d',PhoneC='%d',PhoneBook='%d',ListNumber='%d',Donator='%d',Jailed='%d',JailTime='%d',Products='%d',CrashX='%d',CrashY='%d',CrashZ='%d',CrashInt='%d',CrashW='%d',Crashed='%d',Car Rental='%d' WHERE Name='%s'",
PlayerInfo[playerid][pKey],
PlayerInfo[playerid][pLevel],
PlayerInfo[playerid][pAdmin],
PlayerInfo[playerid][pDonateRank],
PlayerInfo[playerid][pRegistered],
PlayerInfo[playerid][pSex],
PlayerInfo[playerid][pAge],
PlayerInfo[playerid][pExp],
PlayerInfo[playerid][pCash],
PlayerInfo[playerid][pBank],
PlayerInfo[playerid][pSkin],
PlayerInfo[playerid][pDrugs],
PlayerInfo[playerid][pMaterials],
PlayerInfo[playerid][pJob],
PlayerInfo[playerid][pPlayingHours],
PlayerInfo[playerid][pAllowedPayday],
PlayerInfo[playerid][pPayCheck],
PlayerInfo[playerid][pFaction],
PlayerInfo[playerid][pRank],
PlayerInfo[playerid][pHouseKey],
PlayerInfo[playerid][pBizKey],
PlayerInfo[playerid][pSpawnPoint],
PlayerInfo[playerid][pBanned],
PlayerInfo[playerid][pWarnings],
PlayerInfo[playerid][pCarLic],
PlayerInfo[playerid][pFlyLic],
PlayerInfo[playerid][pWepLic],
PlayerInfo[playerid][pPhoneNumber],
PlayerInfo[playerid][pPhoneC],
PlayerInfo[playerid][pPhoneBook],
PlayerInfo[playerid][pListNumber],
PlayerInfo[playerid][pDonator],
PlayerInfo[playerid][pJailed],
PlayerInfo[playerid][pJailTime],
PlayerInfo[playerid][pProducts],
PlayerInfo[playerid][pCrashX],
PlayerInfo[playerid][pCrashY],
PlayerInfo[playerid][pCrashZ],
PlayerInfo[playerid][pCrashInt],
PlayerInfo[playerid][pCrashW],
PlayerInfo[playerid][pCrashed],
PlayerInfo[playerid][pRental],
sendername);
mysql_query(string);
return 1;
The errors are:
Код:
C:\Documents and Settings\Lane720\Desktop\SAMP\samp03asvr_R8_win32\gamemodes\ngrp.pwn(19018) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Lane720\Desktop\SAMP\samp03asvr_R8_win32\gamemodes\ngrp.pwn(19019) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Lane720\Desktop\SAMP\samp03asvr_R8_win32\gamemodes\ngrp.pwn(19019) : error 017: undefined symbol "UPDATE"
C:\Documents and Settings\Lane720\Desktop\SAMP\samp03asvr_R8_win32\gamemodes\ngrp.pwn(19019) : error 017: undefined symbol "Users"
C:\Documents and Settings\Lane720\Desktop\SAMP\samp03asvr_R8_win32\gamemodes\ngrp.pwn(19019) : fatal error 107: too many error messages on one line
Re: MySQL Saving Errors -
Carlton - 08.08.2010
pawn Код:
if(!PlayerLogged[playerid])
return 0;
CheckMySQL();
new string[1312];
format(string, sizeof(string), "UPDATE Users SET Key='%s',Level='%d',AdminLevel='%d',DonateRank='%d',Registered='%ad',Sex='%d',Age='%d',Experience='%d',Money='%d',Bank='%d',Skin='%d',Drugs='%d',Materils='%d',Job='%d',PlayingHours='%d',AllowedPayday='%d',Paycheck='%d',\
Faction='%d',Rank='%d',HouseKey='%d',BizKey='%d',SpawnPoint='%d',Banned='%d',Warnings='%d',CarLic='%d',FlyLic='%d',WepLic='%d',PhoneNumber='%d',PhoneC='%d',PhoneBook='%d',ListNumber='%d',Donator='%d',Jailed='%d',JailTime='%d',\
Products='%d',CrashX='%d',CrashY='%d',CrashZ='%d',CrashInt='%d',CrashW='%d',Crashed='%d',Car Rental='%d' WHERE Name='%s'",
PlayerInfo[playerid][pKey],
PlayerInfo[playerid][pLevel],
PlayerInfo[playerid][pAdmin],
PlayerInfo[playerid][pDonateRank],
PlayerInfo[playerid][pRegistered],
PlayerInfo[playerid][pSex],
PlayerInfo[playerid][pAge],
PlayerInfo[playerid][pExp],
PlayerInfo[playerid][pCash],
PlayerInfo[playerid][pBank],
PlayerInfo[playerid][pSkin],
PlayerInfo[playerid][pDrugs],
PlayerInfo[playerid][pMaterials],
PlayerInfo[playerid][pJob],
PlayerInfo[playerid][pPlayingHours],
PlayerInfo[playerid][pAllowedPayday],
PlayerInfo[playerid][pPayCheck],
PlayerInfo[playerid][pFaction],
PlayerInfo[playerid][pRank],
PlayerInfo[playerid][pHouseKey],
PlayerInfo[playerid][pBizKey],
PlayerInfo[playerid][pSpawnPoint],
PlayerInfo[playerid][pBanned],
PlayerInfo[playerid][pWarnings],
PlayerInfo[playerid][pCarLic],
PlayerInfo[playerid][pFlyLic],
PlayerInfo[playerid][pWepLic],
PlayerInfo[playerid][pPhoneNumber],
PlayerInfo[playerid][pPhoneC],
PlayerInfo[playerid][pPhoneBook],
PlayerInfo[playerid][pListNumber],
PlayerInfo[playerid][pDonator],
PlayerInfo[playerid][pJailed],
PlayerInfo[playerid][pJailTime],
PlayerInfo[playerid][pProducts],
PlayerInfo[playerid][pCrashX],
PlayerInfo[playerid][pCrashY],
PlayerInfo[playerid][pCrashZ],
PlayerInfo[playerid][pCrashInt],
PlayerInfo[playerid][pCrashW],
PlayerInfo[playerid][pCrashed],
PlayerInfo[playerid][pRental],
sendername);
mysql_query(string);
return 1;
Re: MySQL Saving Errors -
Mini` - 09.08.2010
Still didn't work. I split the query up, and that got rid of the errors, but I have no idea if it works or not.