26.03.2015, 15:05
Hey guys, I need help...
So, I was making a Login/Register system with MySQL, and this warning appeared:
Line of the error:
Code:
Can anyone help me pls? Thanks!
So, I was making a Login/Register system with MySQL, and this warning appeared:
pawn Код:
(1357) : warning 219: local variable "query" shadows a variable at a preceding level
Line of the error:
pawn Код:
new Float:X, Float:Y, Float:Z; query[320];
Code:
pawn Код:
stock SaveData(playerid)
{
if(Player[playerid][Logged] == false) return 1;
new Float:X, Float:Y, Float:Z, query[320];
GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
mysql_format(connection, query, sizeof(query), "UPDATE `players` SET `Money`='%d', `Skin`='%d', `Level`='%d', `Wanted`='%d', `Admin`='%d', `Job`='%d', `Vip`='%d', `House`='%d', `Business`='%d', `Vehicle`='%d', `License`='%d', `PosX`=%.1f, `PosY`=%.1f, `PosZ`=%.1f WHERE `ID`='%d'",
Player[playerid][Skin],
Player[playerid][Level],
Player[playerid][Wanted],
Player[playerid][Admin],
Player[playerid][Job],
Player[playerid][Vip],
Player[playerid][House],
Player[playerid][Business],
Player[playerid][Vehicle],
Player[playerid][License],
GetPlayerMoney(playerid),
Float:X,
Float:Y,
Float:Z,
Player[playerid][ID]);
mysql_tquery(connection, query,"DataSaved", "d", playerid);
return 1;
}
