não salva mysql r34 - Hatiro - 18/10/2020
Código: stock SavePlayer(playerid) {
new str[700];
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skin` = %d, `Adm` = %d, `PM` = %d, `Language` = %d, `LanguageTD` = %d, `NickHead` = %d, `Radar` = %d, `Donate` = %d, `Coins` = %d, `Played` = %d, `Wins` = %d, `Rewards` = %d, `RewardsC` = %d, `Sex` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pSkin], Player[playerid][pAdm], Player[playerid][pPM], Player[playerid][pLanguage], Player[playerid][pLanguageTD], Player[playerid][pBI], Player[playerid][pRadar], Player[playerid][pDonate], Player[playerid][pCoins], Player[playerid][pPlayed], Player[playerid][pWins], Player[playerid][pRewards], Player[playerid][pRewardsC], Player[playerid][pChristmasHat], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `MHands` = %d, `MDE` = %d, `M9mm` = %d, `MS9mm` = %d, `MSG` = %d, `MSS` = %d, `MM4` = %d, `MAK47` = %d, `MMP5` = %d, `MGrenade` = %d, `MMC` = %d, `MCR` = %d, `MSR` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pMHands], Player[playerid][pMDE], Player[playerid][pM9mm], Player[playerid][pMS9mm], Player[playerid][pMSG], Player[playerid][pMSS], Player[playerid][pMM4], Player[playerid][pMAK47], Player[playerid][pMMP5], Player[playerid][pMGrenade], Player[playerid][pMMC], Player[playerid][pMCR], Player[playerid][pMSR], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `DHands` = %d, `DDE` = %d, `D9mm` = %d, `DS9mm` = %d, `DSG` = %d, `DSS` = %d, `DM4` = %d, `DAK47` = %d, `DMP5` = %d, `DGrenade` = %d, `DMC` = %d, `DCR` = %d, `DSR` = %d, `DOTHER` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pDHands], Player[playerid][pDDE], Player[playerid][pD9mm], Player[playerid][pDS9mm], Player[playerid][pDSG], Player[playerid][pDSS], Player[playerid][pDM4], Player[playerid][pDAK47], Player[playerid][pDMP5], Player[playerid][pDGrenade], Player[playerid][pDMC], Player[playerid][pDCR], Player[playerid][pDSR], Player[playerid][pDOTHER], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
new save[600];
format(save,600,"%d,",Player[playerid][pSkins][0]);
for(new i=1;i<282;i++) { format(save,600,"%s%d,",save, Player[playerid][pSkins][i]); }
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skins` = '%d' WHERE `Name` = '%e' LIMIT 1", save, Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
return true;
}
não salva tentei fazer 1 comando
Código: CMD:saveme(playerid) SavePlayer(playerid);
RE: não salva mysql r34 - Gm_KoDi - 18/10/2020
(18/10/2020 23:28)Hatiro Escreveu: Código: stock SavePlayer(playerid) {
new str[700];
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skin` = %d, `Adm` = %d, `PM` = %d, `Language` = %d, `LanguageTD` = %d, `NickHead` = %d, `Radar` = %d, `Donate` = %d, `Coins` = %d, `Played` = %d, `Wins` = %d, `Rewards` = %d, `RewardsC` = %d, `Sex` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pSkin], Player[playerid][pAdm], Player[playerid][pPM], Player[playerid][pLanguage], Player[playerid][pLanguageTD], Player[playerid][pBI], Player[playerid][pRadar], Player[playerid][pDonate], Player[playerid][pCoins], Player[playerid][pPlayed], Player[playerid][pWins], Player[playerid][pRewards], Player[playerid][pRewardsC], Player[playerid][pChristmasHat], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `MHands` = %d, `MDE` = %d, `M9mm` = %d, `MS9mm` = %d, `MSG` = %d, `MSS` = %d, `MM4` = %d, `MAK47` = %d, `MMP5` = %d, `MGrenade` = %d, `MMC` = %d, `MCR` = %d, `MSR` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pMHands], Player[playerid][pMDE], Player[playerid][pM9mm], Player[playerid][pMS9mm], Player[playerid][pMSG], Player[playerid][pMSS], Player[playerid][pMM4], Player[playerid][pMAK47], Player[playerid][pMMP5], Player[playerid][pMGrenade], Player[playerid][pMMC], Player[playerid][pMCR], Player[playerid][pMSR], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `DHands` = %d, `DDE` = %d, `D9mm` = %d, `DS9mm` = %d, `DSG` = %d, `DSS` = %d, `DM4` = %d, `DAK47` = %d, `DMP5` = %d, `DGrenade` = %d, `DMC` = %d, `DCR` = %d, `DSR` = %d, `DOTHER` = %d WHERE `Name` = '%e' LIMIT 1",
Player[playerid][pDHands], Player[playerid][pDDE], Player[playerid][pD9mm], Player[playerid][pDS9mm], Player[playerid][pDSG], Player[playerid][pDSS], Player[playerid][pDM4], Player[playerid][pDAK47], Player[playerid][pDMP5], Player[playerid][pDGrenade], Player[playerid][pDMC], Player[playerid][pDCR], Player[playerid][pDSR], Player[playerid][pDOTHER], Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
new save[600];
format(save,600,"%d,",Player[playerid][pSkins][0]);
for(new i=1;i<282;i++) { format(save,600,"%s%d,",save, Player[playerid][pSkins][i]); }
mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skins` = '%d' WHERE `Name` = '%e' LIMIT 1", save, Player[playerid][pName]);
mysql_function_query(mysql, str, false, "", "");
return true;
}
não salva tentei fazer 1 comando
Código: CMD:saveme(playerid) SavePlayer(playerid);
'%e' não é para string em pawn, correto é '%s'
RE: não salva mysql r34 - Hatiro - 18/10/2020
Código: mysql_format(mysql, str, sizeof(str), "SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1", Player[playerid][pName]);
também ta errado então?
RE: não salva mysql r34 - Gm_KoDi - 18/10/2020
(18/10/2020 23:38)Hatiro Escreveu: Código: mysql_format(mysql, str, sizeof(str), "SELECT * FROM `users` WHERE `Name` = '%e' LIMIT 1", Player[playerid][pName]);
também ta errado então?
Vo falar pra vc, esse '%e' não me lembro bem mas no windows funcionava e o no linux não ou era ao contrario, dava bug, não sei se era da versão do plugin e include que eu usava
RE: não salva mysql r34 - Hatiro - 19/10/2020
a host que to usando é linux mais mesmo assim n pego
no windows(local) que eu testei salvo de boa mesmo usando %e mais no linux não salva
Código: mysql_format(mysql,str,sizeof(str),"UPDATE `users` SET `Skin` = %d, `Adm` = %d, `PM` = %d, `Language` = %d, `LanguageTD` = %d, `NickHead` = %d, `Radar` = %d, `Donate` = %d, `Coins` = %d, `Played` = %d, `Wins` = %d, `Rewards` = %d, `RewardsC` = %d, `Sex` = %d WHERE `Name` = '%d' LIMIT 1",
Player[playerid][pSkin], Player[playerid][pAdm], Player[playerid][pPM], Player[playerid][pLanguage], Player[playerid][pLanguageTD], Player[playerid][pBI], Player[playerid][pRadar], Player[playerid][pDonate], Player[playerid][pCoins], Player[playerid][pPlayed], Player[playerid][pWins], Player[playerid][pRewards], Player[playerid][pRewardsC], Player[playerid][pChristmasHat], Player[playerid][pName]);
RE: não salva mysql r34 - Hatiro - 19/10/2020
já foi resolvido muito obrigado a todos <3
RE: não salva mysql r34 - willttoonn - 20/10/2020
Resolvido, tópico fechado.
|