25.06.2012, 08:02
Код:
stock MySQL_Register(playerid, passwordstring[]) { new query[500], pname[24], IP[16]; GetPlayerName(playerid, pname, 24); GetPlayerIp(playerid, IP, 16); format(query, sizeof(query), "INSERT INTO playerdata (user, password, score, money, IP,admin,faction,leader,cuffed,badge,accent,gender,skin,xchord, ychord, zchord,health,armor) VALUES('%s', SHA1('%s'),0, 0, '%s',0,0,0,0,0,0,0,299,1714,-1882,14,100,0)", pname, passwordstring, IP); mysql_query(query); SendClientMessage(playerid, -1, "You have been registered on this server!"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Gender", "Male\nFemale", "Select", ""); Logged[playerid] = 1; return 1; }
Код:
[04:07:35] CMySQLHandler::Query(INSERT INTO playerdata (user, password, score, money, IP,admin,faction,leader,cuffed,badge,accent,gender,skin,xchord, ychord, zchord,health,armor) VALUES('Nestea', SHA1('test'),0, 0, '127.0.0.1',0,0,0,0,0,0,0,0,299,1714,-1882,14,100,0)) - An error has occured. (Error ID: 1136, Column count doesn't match value count at row 1)