Guten Morgen,
Ich bin grade dabei ein ORM basierendes Login / Register system zuschreiben.
Un mein Problem ist das er den namen nicht in die Tabelle schreibt.
Hier der code von OnPlayerConnect
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, Player[playerid][pName], MAX_PLAYER_NAME+1);
new ORM:ormid = Player[playerid][pORM_ID] = orm_create(SERVERTAG"_Accounts");
orm_addvar_int(ormid, Player[playerid][pSQLid], "SQLid");
orm_addvar_string(ormid, Player[playerid][pName], MAX_PLAYER_NAME+1, "Name");
orm_addvar_string(ormid, Player[playerid][pPassword],100,"Password");
orm_addvar_int(ormid, Player[playerid][pCash], "Cash");
orm_addvar_int(ormid, Player[playerid][pScore], "Score");
orm_addvar_int(ormid, Player[playerid][pAdmin], "Admin");
orm_addvar_int(ormid, Player[playerid][pFraktion], "Fraktion");
orm_addvar_int(ormid, Player[playerid][pFraktionsRang], "FraktionsRang");
orm_addvar_int(ormid, Player[playerid][pChar], "Char");
orm_setkey(ormid, "Name");
orm_select(ormid, "OnQueryFinish", "dd", _SQL_CheckAccount, playerid);
return 1;
}
Hier der MySQl Log:
[09:18:23] [DEBUG] orm_create - table: "PoG_Accounts", connectionHandle: 1
[09:18:23] [DEBUG] COrm::Create - creating new orm object..
[09:18:23] [DEBUG] COrm::Create - orm object created (id: 1)
[09:18:23] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDB1C, varname: "SQLid"
[09:18:23] [DEBUG] orm_addvar_string - orm_id: 1, var: 033EDB20, var_maxlen: 25, varname: "Name"
[09:18:23] [DEBUG] orm_addvar_string - orm_id: 1, var: 033EDB84, var_maxlen: 100, varname: "Password"
[09:18:23] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDF70, varname: "Cash"
[09:18:24] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDF74, varname: "Score"
[09:18:24] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDF6C, varname: "Admin"
[09:18:24] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDF80, varname: "Fraktion"
[09:18:24] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDF84, varname: "FraktionsRang"
[09:18:24] [DEBUG] orm_addvar_int - orm_id: 1, var: 033EDF78, varname: "Char"
[09:18:24] [DEBUG] orm_setkey - orm_id: 1, varname: "Name"
[09:18:24] [DEBUG] orm_select - orm_id: 1, callback: "OnQueryFinish", format: "dd"
[09:18:24] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - starting query execution
[09:18:24] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - query was successfully executed within 1.76 milliseconds
[09:18:24] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[09:18:24] [DEBUG] Calling callback "OnQueryFinish"..
[09:18:24] [DEBUG] cache_get_row_count - connection: 1
[09:18:24] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[09:18:30] [DEBUG] mysql_escape_string - source: "23021997", connection: 1, max_len: 128
[09:18:30] [DEBUG] orm_insert - orm_id: 1, callback: "OnQueryFinish", format: "dd"
[09:18:31] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - starting query execution
[09:18:31] [DEBUG] CMySQLQuery::Execute[OnQueryFinish] - query was successfully executed within 189.275 milliseconds
[09:18:31] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[09:18:31] [DEBUG] Calling callback "OnQueryFinish"..
[09:18:31] [DEBUG] orm_errno - orm_id: 1
[09:18:31] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
Alles anzeigen