18.01.2013, 13:07
Hello, I made this code. but when i add the IP insert it doesn't work, but without IP it works.
what is the problem with the IP?
Код:
stock CreateAccount(playerid, salt[], pass[129]) { new query[240], escapedPlayerName[MAX_PLAYER_NAME], IP[16]; mysql_real_escape_string(GetName2(playerid), escapedPlayerName); GetPlayerIp(playerid, IP, sizeof(IP)); format(query, sizeof(query), "INSERT INTO `users` (name, salt, password, IP) VALUES (\'%s\', \'%s\', \'%s\', \'%s\')",escapedPlayerName,salt,pass,IP); mysql_function_query(dbHandle, query, false, "OnAccountCreate", "d", playerid); }