17.06.2014, 19:10
pawn Код:
forward MasterAccountRegister(playerid); // Register a new Master Account if name not already in use.
public MasterAccountRegister(playerid)
{
if(!AccountExists(playerid))
{
format(mysql_query, sizeof(mysql_query), "INSERT INTO `Master` ( `username` , `password` , `email_address` , `ip_address` , `super_admin` , `old_ip` ) VALUES ( '%s' , '%s', '%s', '%s', 0, 'UNKNOWN' )", mysql_real_escape_string(PlayerName(playerid)), mysql_real_escape_string(GetPVarStringEx(playerid, "TEMP_PASSWORD")), mysql_real_escape_string(GetPVarStringEx(playerid, "TEMP_EMAIL")), GetPlayerIPEx(playerid));
mysql_free_result(mysql_query(database,mysql_query));
DeletePVar(playerid,"TEMP_EMAIL");
DeletePVar(playerid,"TEMP_PASSWORD");
printf("%s has successfully registered.", cName(playerid));
return true;
}
return false;
}
pawn Код:
(528) : error 076: syntax error in the expression, or invalid function call
(528) : error 072: "sizeof" operator is invalid on "function" symbols
(529) : error 017: undefined symbol "mysql_free_result"
(532) : error 012: invalid function call, not a valid address
(532) : warning 215: expression has no effect
(532) : error 001: expected token: ";", but found ")"
(532) : error 029: invalid expression, assumed zero
(532) : fatal error 107: too many error messages on one line