Guten ABend,
mein Registrierungsdatum wird nicht angezeigt.
Vom Code her müsste doch alles richtig sein?
Code:
ZitatAlles anzeigen[16:24:30] >> mysql_real_escape_string( Connection handle: 1 )
[16:24:30] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.
[16:24:30] >> mysql_real_escape_string( Connection handle: 1 )
[16:24:30] CMySQLHandler::EscapeString(Registrierungsdatum); - Escaped 19 characters to Registrierungsdatum.
[16:24:30] >> mysql_real_escape_string( Connection handle: 1 )
[16:24:30] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.
[16:24:30] >> mysql_real_escape_string( Connection handle: 1 )
[16:24:30] CMySQLHandler::EscapeString(Andrzejxy); - Escaped 9 characters to Andrzejxy.
stock CreateAccount(playerid, pass[])
{
new query[256],Datum[30],Name[MAX_PLAYER_NAME];
getdate(Jahr,Monat,Tag);gettime(Stunde,Minute);
format(Datum,sizeof(Datum),"%d.%d.%d um %d:%d",Tag,Monat,Jahr,Stunde,Minute);
SpielerInfo[playerid][pRegDate] = Datum;
mysql_SetString("accounts","Registrierungsdatum",Datum,"Name",SpielerInfo[playerid][pName]);
GetPlayerName(playerid, Name,MAX_PLAYER_NAME);
mysql_real_escape_string(Name,Name);
mysql_real_escape_string(pass,pass);
format(query,sizeof(query),"INSERT INTO accounts (Name, Passwort, Registrierungsdatum) VALUES ('%s', '%s', '0')",Name,pass,SpielerInfo[playerid][pRegDate]);
mysql_query(query);
return true;
}
Laden:
format(SpielerInfo[playerid][pRegDate],32,"%s",mysql_GetString("accounts","Registrierungsdatum","Name", SpielerInfo[playerid][pName]));
Speichern;
mysql_SetString("accounts","Registrierungsdatum", SpielerInfo[playerid][pRegDate],"Name", SpielerInfo[playerid][pName]);