Mahlzeit, habe da ein Problem.
Ich weiß dass ich irgendwie alles zu umständlich mache aber muss mich in MySQL erstmal einarbeiten
Also auf dem Server kommt es bis zum Debug "SaveAccount 4.0" was ich irgendwie auch nicht verstehe... Naja...
Jedenfalls komme ich da nicht weiter und bräuchte Hilfe...
PHP
public SaveAccount(playerid)
{
SendClientMessageToAll(COLOR_RED, "SaveAccount 1");
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
SendClientMessageToAll(COLOR_RED, "SaveAccount 2");
if(Eingeloggt[playerid] == 1)
{
SendClientMessageToAll(COLOR_RED, "SaveAccount 3");
//new string1[200], string2[512], string3[256];
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.1");
//new string4[512], string5[256], string6[512];
//new string7[256], string8[256];
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.2");
//new all1[1024], all2[1024], all3[1024];
//format(string1, sizeof(string1), "AdminLevel = '%d', PremiumRang = '%d', Warns = '%d', Registriert = '%d', Charakter = '%d', Gebannt = '%d', BanZeit = '%d', Eingeloggt = '%d'",
//PlayerInfo[playerid][pAdminLevel],PlayerInfo[playerid][pPremiumRang],PlayerInfo[playerid][pWarns],PlayerInfo[playerid][pRegistriert],PlayerInfo[playerid][pCharakter],PlayerInfo[playerid][pGebannt],PlayerInfo[playerid][pBanZeit],PlayerInfo[playerid][pEingeloggt]);
//format(string2, sizeof(string2), "C1Geschlecht = '%d', C1Alter = '%d', C1Member = '%d', C1Leader = '%d', C1Rang = '%d', C1Level = '%d', C1JobID = '%d', C1Gemuted = '%d', C1Geld = '%d', C1Interior = '%d', C1VirtualWorld = '%d', C1Kills = '%d', C1Tode = '%d', C1Eingesperrt = '%d', C1EingesperrteZeit = '%d', C1FraktionsSperre = '%d', C1TankDabei = '%d', C1SkinID = '%d'",
//PlayerInfo[playerid][pC1Geschlecht],PlayerInfo[playerid][pC1Alter],PlayerInfo[playerid][pC1Member],PlayerInfo[playerid][pC1Leader],PlayerInfo[playerid][pC1Rang],PlayerInfo[playerid][pC1Level],PlayerInfo[playerid][pC1JobID],PlayerInfo[playerid][pC1Gemuted],PlayerInfo[playerid][pC1Geld],PlayerInfo[playerid][pC1Interior],PlayerInfo[playerid][pC1VirtualWorld],PlayerInfo[playerid][pC1Kills],PlayerInfo[playerid][pC1Tode],PlayerInfo[playerid][pC1Eingesperrt],
//PlayerInfo[playerid][pC1EingesperrteZeit],PlayerInfo[playerid][pC1FraktionsSperre],PlayerInfo[playerid][pC1TankDabei],PlayerInfo[playerid][pC1SkinID]);
//format(string3, sizeof(string3), "C1FraktionsGehalt = '%d', C1SpielMinuten = '%d', C1SpielStunden = '%d', C1Kontostand = '%d', C1HandyID = '%d', C1HandyNummer = '%d'",
//PlayerInfo[playerid][pC1FraktionsGehalt],PlayerInfo[playerid][pC1SpielMinuten],PlayerInfo[playerid][pC1SpielStunden],PlayerInfo[playerid][pC1Kontostand],PlayerInfo[playerid][pC1HandyID],PlayerInfo[playerid][pC1HandyNummer]);
//format(string4, sizeof(string4), "C2Geschlecht='%d',C2Alter='%d',C2Member='%d',C2Leader='%d',C2Rang='%d',C2Level='%d',C2JobID='%d',C2Gemuted='%d',C2Geld='%d',C2Interior='%d',C2VirtualWorld='%d',C2Kills='%d',C2Tode='%d',C2Eingesperrt='%d',C2EingesperrteZeit='%d',C2FraktionsSperre='%d',C2TankDabei='%d',C2SkinID='%d'",
//PlayerInfo[playerid][pC2Geschlecht],PlayerInfo[playerid][pC2Alter],PlayerInfo[playerid][pC2Member],PlayerInfo[playerid][pC2Leader],PlayerInfo[playerid][pC2Rang],PlayerInfo[playerid][pC2Level],PlayerInfo[playerid][pC2JobID],PlayerInfo[playerid][pC2Gemuted],PlayerInfo[playerid][pC2Geld],PlayerInfo[playerid][pC2Interior],PlayerInfo[playerid][pC2VirtualWorld],PlayerInfo[playerid][pC2Kills],PlayerInfo[playerid][pC2Tode],PlayerInfo[playerid][pC2Eingesperrt],
//PlayerInfo[playerid][pC2EingesperrteZeit],PlayerInfo[playerid][pC2FraktionsSperre],PlayerInfo[playerid][pC2TankDabei],PlayerInfo[playerid][pC2SkinID]);
//format(string5, sizeof(string5), "C2FraktionsGehalt='%d',C2SpielMinuten='%d',C2SpielStunden='%d',C2Kontostand='%d',C2HandyID='%d',C2HandyNummer='%d'",
//PlayerInfo[playerid][pC2FraktionsGehalt],PlayerInfo[playerid][pC2SpielMinuten],PlayerInfo[playerid][pC2SpielStunden],PlayerInfo[playerid][pC2Kontostand],PlayerInfo[playerid][pC2HandyID],PlayerInfo[playerid][pC2HandyNummer]);
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.3");
//format(string6, sizeof(string6), "C3Geschlecht='%d',C3Alter='%d',C3Member='%d',C3Leader='%d',C3Rang='%d',C3Level='%d',C3JobID='%d',C3Gemuted='%d',C3Geld='%d',C3Interior='%d',C3VirtualWorld='%d',C3Kills='%d',C3Tode='%d',C3Eingesperrt='%d',C3EingesperrteZeit='%d',C3FraktionsSperre='%d',C3TankDabei='%d',C3SkinID='%d'",
//PlayerInfo[playerid][pC3Geschlecht],PlayerInfo[playerid][pC3Alter],PlayerInfo[playerid][pC3Member],PlayerInfo[playerid][pC3Leader],PlayerInfo[playerid][pC3Rang],PlayerInfo[playerid][pC3Level],PlayerInfo[playerid][pC3JobID],PlayerInfo[playerid][pC3Gemuted],PlayerInfo[playerid][pC3Geld],PlayerInfo[playerid][pC3Interior],PlayerInfo[playerid][pC3VirtualWorld],PlayerInfo[playerid][pC3Kills],PlayerInfo[playerid][pC3Tode],PlayerInfo[playerid][pC3Eingesperrt],
//PlayerInfo[playerid][pC3EingesperrteZeit],PlayerInfo[playerid][pC3FraktionsSperre],PlayerInfo[playerid][pC3TankDabei],PlayerInfo[playerid][pC3SkinID]);
//format(string7, sizeof(string7), "C3FraktionsGehalt='%d',C3SpielMinuten='%d',C3SpielStunden='%d',C3Kontostand='%d',C3HandyID='%d',C3HandyNummer='%d'",
//PlayerInfo[playerid][pC3FraktionsGehalt],PlayerInfo[playerid][pC3SpielMinuten],PlayerInfo[playerid][pC3SpielStunden],PlayerInfo[playerid][pC3Kontostand],PlayerInfo[playerid][pC3HandyID],PlayerInfo[playerid][pC3HandyNummer]);
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.4");
//format(string8, sizeof(string8), "BanGrund='%s',RegistrationsDatum='%s',LetzteIPAdresse='%s',C1Name='%s',C2Name='%s',C3Name='%s'",
//PlayerInfo[playerid][pBanGrund],PlayerInfo[playerid][pRegistrationsDatum],PlayerInfo[playerid][pLetzteIPAdresse],PlayerInfo[playerid][pC1Name],PlayerInfo[playerid][pC2Name],PlayerInfo[playerid][pC3Name]);
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.5");
/*format(all1, sizeof(all1), "%s%s%s", string1, string2, string3);
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.6");
format(all2, sizeof(all2), "%s%s%s", string4, string5, string7);
SendClientMessageToAll(COLOR_RED, "SaveAccount 3.7");
format(all3, sizeof(all3), "%s%s%s", string6, string8);*/
SendClientMessageToAll(COLOR_RED, "SaveAccount 4");
new query1[256], query2[512];
new query3[256], query4[512];
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.0");
new query5[256];
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.0.1");
new query6[256];
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.0.2");
new query7[256];
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.0.3");
new query8[256];
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.1");
mysql_format(mysql_handle, query1, sizeof(query1), "UPDATE users SET AdminLevel = '%d', PremiumRang = '%d', Warns = '%d', Registriert = '%d', Charakter = '%d', Gebannt = '%d', BanZeit = '%d', Eingeloggt = '%d'2",
PlayerInfo[playerid][pAdminLevel],PlayerInfo[playerid][pPremiumRang],PlayerInfo[playerid][pWarns],PlayerInfo[playerid][pRegistriert],PlayerInfo[playerid][pCharakter],PlayerInfo[playerid][pGebannt],PlayerInfo[playerid][pBanZeit],PlayerInfo[playerid][pEingeloggt]);
mysql_pquery(mysql_handle, query1);
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.2");
mysql_format(mysql_handle, query2, sizeof(query2), "UPDATE users SET C1Geschlecht = '%d', C1Alter = '%d', C1Member = '%d', C1Leader = '%d', C1Rang = '%d', C1Level = '%d', C1JobID = '%d', C1Gemuted = '%d', C1Geld = '%d', C1Interior = '%d', C1VirtualWorld = '%d', C1Kills = '%d', C1Tode = '%d', C1Eingesperrt = '%d', C1EingesperrteZeit = '%d', C1FraktionsSperre = '%d', C1TankDabei = '%d', C1SkinID = '%d'",
PlayerInfo[playerid][pC1Geschlecht],PlayerInfo[playerid][pC1Alter],PlayerInfo[playerid][pC1Member],PlayerInfo[playerid][pC1Leader],PlayerInfo[playerid][pC1Rang],PlayerInfo[playerid][pC1Level],PlayerInfo[playerid][pC1JobID],PlayerInfo[playerid][pC1Gemuted],PlayerInfo[playerid][pC1Geld],PlayerInfo[playerid][pC1Interior],PlayerInfo[playerid][pC1VirtualWorld],PlayerInfo[playerid][pC1Kills],PlayerInfo[playerid][pC1Tode],PlayerInfo[playerid][pC1Eingesperrt],
PlayerInfo[playerid][pC1EingesperrteZeit],PlayerInfo[playerid][pC1FraktionsSperre],PlayerInfo[playerid][pC1TankDabei],PlayerInfo[playerid][pC1SkinID]);
mysql_pquery(mysql_handle, query2);
mysql_format(mysql_handle, query3, sizeof(query3), "UPDATE users SET C1FraktionsGehalt = '%d', C1SpielMinuten = '%d', C1SpielStunden = '%d', C1Kontostand = '%d', C1HandyID = '%d', C1HandyNummer = '%d'",
PlayerInfo[playerid][pC1FraktionsGehalt],PlayerInfo[playerid][pC1SpielMinuten],PlayerInfo[playerid][pC1SpielStunden],PlayerInfo[playerid][pC1Kontostand],PlayerInfo[playerid][pC1HandyID],PlayerInfo[playerid][pC1HandyNummer]);
mysql_pquery(mysql_handle, query3);
mysql_format(mysql_handle, query4, sizeof(query4), "UPDATE users SET C2Geschlecht = '%d', C2Alter = '%d', C2Member = '%d', C2Leader = '%d', C2Rang = '%d', C2Level = '%d', C2JobID = '%d', C2Gemuted = '%d', C2Geld = '%d', C2Interior = '%d', C2VirtualWorld = '%d', C2Kills = '%d', C2Tode = '%d', C2Eingesperrt = '%d', C2EingesperrteZeit = '%d', C2FraktionsSperre = '%d', C2TankDabei = '%d', C2SkinID = '%d'",
PlayerInfo[playerid][pC2Geschlecht],PlayerInfo[playerid][pC2Alter],PlayerInfo[playerid][pC2Member],PlayerInfo[playerid][pC2Leader],PlayerInfo[playerid][pC2Rang],PlayerInfo[playerid][pC2Level],PlayerInfo[playerid][pC2JobID],PlayerInfo[playerid][pC2Gemuted],PlayerInfo[playerid][pC2Geld],PlayerInfo[playerid][pC2Interior],PlayerInfo[playerid][pC2VirtualWorld],PlayerInfo[playerid][pC2Kills],PlayerInfo[playerid][pC2Tode],PlayerInfo[playerid][pC2Eingesperrt],
PlayerInfo[playerid][pC2EingesperrteZeit],PlayerInfo[playerid][pC2FraktionsSperre],PlayerInfo[playerid][pC2TankDabei],PlayerInfo[playerid][pC2SkinID]);
mysql_pquery(mysql_handle, query4);
mysql_format(mysql_handle, query5, sizeof(query5), "UPDATE users SET C2FraktionsGehalt = '%d', C2SpielMinuten = '%d', C2SpielStunden = '%d', C2Kontostand = '%d', C2HandyID = '%d', C2HandyNummer = '%d'",
PlayerInfo[playerid][pC2FraktionsGehalt],PlayerInfo[playerid][pC2SpielMinuten],PlayerInfo[playerid][pC2SpielStunden],PlayerInfo[playerid][pC2Kontostand],PlayerInfo[playerid][pC2HandyID],PlayerInfo[playerid][pC2HandyNummer]);
mysql_pquery(mysql_handle, query5);*/
mysql_format(mysql_handle, query6, sizeof(query6), "UPDATE users SET C3Geschlecht = '%d', C3Alter = '%d', C3Member = '%d', C3Leader = '%d', C3Rang = '%d', C3Level = '%d', C3JobID = '%d', C3Gemuted = '%d', C3Geld = '%d', C3Interior = '%d', C3VirtualWorld = '%d', C3Kills = '%d', C3Tode = '%d', C3Eingesperrt = '%d', C3EingesperrteZeit = '%d', C3FraktionsSperre = '%d', C3TankDabei = '%d', C3SkinID = '%d'",
PlayerInfo[playerid][pC3Geschlecht],PlayerInfo[playerid][pC3Alter],PlayerInfo[playerid][pC3Member],PlayerInfo[playerid][pC3Leader],PlayerInfo[playerid][pC3Rang],PlayerInfo[playerid][pC3Level],PlayerInfo[playerid][pC3JobID],PlayerInfo[playerid][pC3Gemuted],PlayerInfo[playerid][pC3Geld],PlayerInfo[playerid][pC3Interior],PlayerInfo[playerid][pC3VirtualWorld],PlayerInfo[playerid][pC3Kills],PlayerInfo[playerid][pC3Tode],PlayerInfo[playerid][pC3Eingesperrt],
PlayerInfo[playerid][pC3EingesperrteZeit],PlayerInfo[playerid][pC3FraktionsSperre],PlayerInfo[playerid][pC3TankDabei],PlayerInfo[playerid][pC3SkinID]);
mysql_pquery(mysql_handle, query6);
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.3");
mysql_format(mysql_handle, query7, sizeof(query7), "UPDATE users SET C3FraktionsGehalt = '%d', C3SpielMinuten = '%d', C3SpielStunden = '%d', C3Kontostand = '%d', C3HandyID = '%d', C3HandyNummer = '%d'",
PlayerInfo[playerid][pC3FraktionsGehalt],PlayerInfo[playerid][pC3SpielMinuten],PlayerInfo[playerid][pC3SpielStunden],PlayerInfo[playerid][pC3Kontostand],PlayerInfo[playerid][pC3HandyID],PlayerInfo[playerid][pC3HandyNummer]);
mysql_pquery(mysql_handle, query7);
mysql_format(mysql_handle, query8, sizeof(query8), "UPDATE users SET BanGrund = '%s', RegistrationsDatum = '%s', LetzteIPAdresse = '%s', C1Name = '%s', C2Name = '%s', C3Name = '%s'",
PlayerInfo[playerid][pBanGrund],PlayerInfo[playerid][pRegistrationsDatum],PlayerInfo[playerid][pLetzteIPAdresse],PlayerInfo[playerid][pC1Name],PlayerInfo[playerid][pC2Name],PlayerInfo[playerid][pC3Name]);
mysql_pquery(mysql_handle, query8);
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.4");
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.5");
SendClientMessageToAll(COLOR_RED, "SaveAccount 4.6");
SendClientMessageToAll(COLOR_RED, "SaveAccount 5");
}
else
{
SendClientMessageToAll(COLOR_RED, "Speichern fehlgeschlagen...");
}
}
else
{
SendClientMessageToAll(COLOR_RED, "SaveAccount 6");
}
return 1;
}
Alles anzeigen
MfG
GMP