Hi Leutz,
das Updaten meines Alters funktioniert nicht...
Hier die Daten vom Script:
setAlter(playerid,newOne)
{ SetPVarInt(playerid,"Alter",newOne); return 1; }
getAlter(playerid)
{ new i = GetPVarInt(playerid,"Alter"); return i; }
//OnPlayerDisconnect
format(query,sizeof(query),"UPDATE Account_Tab SET Passwort = '%s' WHERE Username = '%s'",getPasswort(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Adminlevel = '%d' WHERE Username = '%s'",getAdminLv(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Alter = '%d' WHERE Username = '%s'",getAlter(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Herkunft = '%s' WHERE Username = '%s'",getHerkunft(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Geschlecht = '%s' WHERE Username = '%s'",getGeschlecht(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Job = '%s' WHERE Username = '%s'",getJob(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Fraktion = '%s' WHERE Username = '%s'",getFraktion(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Rank = '%d' WHERE Username = '%s'",getRank(playerid),GetName(playerid)); mysql_query(query);
format(query,sizeof(query),"UPDATE Account_Tab SET Wanted = '%d' WHERE Username = '%s'",getWanted(playerid),GetName(playerid)); mysql_query(query);
Hier der Debug:
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Passwort = '' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Adminlevel = '0' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Alter = '5' WHERE Username = 'NicoAiko') - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Alter = '5' WHERE Username = 'NicoAiko'' at line 1)
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Herkunft = 'Deutschland' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Geschlecht = '' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Job = '' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Fraktion = '' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Rank = '0' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
[14:33:44] CMySQLHandler::Query(UPDATE Account_Tab SET Wanted = '8' WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:44] >> mysql_query( Connection handle: 1 )
Alles anzeigen
Irgendwie ist alles durcheinander...
Es wird auch irgendwie Wirr-Warr geladen...
Hier der Code
new Passwort_Input[128];
GetAccountPasswort(GetName(playerid),Passwort_Input);
if(!strcmp(Passwort_Input,inputtext,true))
{
new query[550],string[128];
format(query,sizeof(query),"SELECT * FROM Account_Tab WHERE Username = '%s'",GetName(playerid));
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row(query))
{
sscanf(query,"e<p<|>ds[25]s[128]dds[30]s[30]s[30]s[30]dd>",MySQL_Enum[playerid]);
}
setMySQLToPVar(playerid);
fscm(string,playerid,Color_Server,"Willkommen %s, wir freuen uns dich wieder zu sehen.",GetName(playerid));
if(getAdminLv(playerid) > 0)
{
fscm(string,playerid,Color_Server,"Info: Du hast dich erfolgreich eingeloggt und besitzt den Adminstatus %d",getAdminLv(playerid));
return 1;
}
scm(playerid,Color_Server,"Du hast dich erfolgreich eingeloggt.");
return 1;
}
else
{
ShowPlayerDialog(playerid,Dialog_Login_Passwort,DIALOG_STYLE_INPUT,"Login - Passwort","{FFFFFF}Bitte gebe dein {FF0000}richtiges {FFFFFF}ein.","Login","Abbrechen");
return 1;
}
Auch dazu der Quellcode
[14:33:33] CMySQLHandler::Query(SELECT * FROM Account_Tab WHERE Username = 'NicoAiko') - Successfully executed.
[14:33:33] >> mysql_store_result( Connection handle: 1 )
[14:33:33] CMySQLHandler::StoreResult() - Result was stored.
[14:33:33] >> mysql_fetch_row_format( Connection handle: 1 )
[14:33:33] CMySQLHandler::FetchRow() - Return: 1|NicoAiko|Aptx4869|5|16|Deutschland|Männlich|Kein|FBI|8|0
[14:33:33] >> mysql_fetch_row_format( Connection handle: 1 )
[14:33:44] >> mysql_query( Connection handle: 1 )
Vielen Dank für eure Hilfe