13.01.2012, 10:19
hi I have this error :
NF-RP.pwn(31 : error 021: symbol already defined: "escapedValue" Why??
Code :
NF-RP.pwn(31 : error 021: symbol already defined: "escapedValue" Why??
Code :
PHP код:
case DIALOG_REGISTER_FINAL :
{
new pVar[2][24], email[129], escapedValue[3][24], escapedEmail[129], query[256]; // pVar[0] = pPass, pVar[1] = pOrigine
GetPVarString(playerid, "REGISTER_PASS", pVar[0], 24 );
GetPVarString(playerid, "REGISTER_ORIGINE", pVar[1], 24 );
GetPVarString(playerid, "REGISTER_EMAIL", email, 129 );
mysql_real_escape_string(pVar[0], escapedValue[0]);
mysql_real_escape_string(pVar[1], escapedValue[1]);
mysql_real_escape_string(PlayerName(playerid), escapedValue[2]);
mysql_real_escape_string(email, escapedEmail);
format(query, sizeof(query), "INSERT INTO `playersdata` (`pName`, `pPassword`, `pSexe`, `pAge`, `pOrigine`, `pEmail`) VALUES ('%s', '%s', '%i', '%i', '%s', '%s')",
escapedValue[2], escapedValue[0], GetPVarInt(playerid, "REGISTER_SEXE"), GetPVarInt(playerid, "REGISTER_AGE"), escapedValue[1], escapedEmail);
mysql_query(query);
}
case DIALOG_LOGIN :
{
if(!response) return Kick(playerid);
new escapedValue[2][24], query[256]; // [0] = pName, [1] = pPassword
mysql_real_escape_string(PlayerName(playerid), escapedValue[0]);
mysql_real_escape_string(inputtext, escapedValue[1]);
format(query, sizeof(query), "SELECT * FROM `playersdata` WHERE `pName` = '%s' AND `pPassword` = '%s'",escapedValue[0], escapedValue[1]);
mysql_query(query, THREAD_LOAD_PLAYER_DATA, playerid);
}