16.03.2014, 20:16
Hello i have a problem with my mysql register...
I want to initialize the level field with 1 and the cash with 5000$ ... so that the player will start with that ammount!
and the debug of this part:
so if you can see the query is not fully loaded... I don't know.
a wierd thing is that the user and the password are inserted... + THE IP is inserted too...
I want to initialize the level field with 1 and the cash with 5000$ ... so that the player will start with that ammount!
Код:
stock MySQL_Register(playerid, passwordstring[]) { new query[450], pname[24], IP[15]; GetPlayerName(playerid, pname, 24); GetPlayerIp(playerid, IP, 15); format(query, sizeof(query), "INSERT INTO playerdata (user, password, level, cash, admin, ban, faction ,IP) VALUES('%s', SHA1('%s'),1, 5000, 0, 0, 0, '%s')", pname,passwordstring,IP); new Cache:result = mysql_query(sql,query); cache_delete(result); Logged[playerid] = 1; return 1; }
Код:
[22:19:30] [DEBUG] mysql_query - connection: 1, query: "INSERT INTO playerdata (user, password, level, cash, admin, ban,", use_cache: true [22:19:30] [DEBUG] CMySQLQuery::Execute - starting query execution [22:19:30] [DEBUG] CMySQLQuery::Execute - query was successfully executed within 33.228 milliseconds [22:19:30] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [22:19:30] [DEBUG] CMySQLHandle::SaveActiveResult - cache saved (id: 2) [22:19:30] [DEBUG] cache_delete - cache_id: 2, connection: 1 [22:19:30] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [22:19:30] [DEBUG] CMySQLHandle::DeleteSavedResult - result deleted
a wierd thing is that the user and the password are inserted... + THE IP is inserted too...