Help me fix this error please - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me fix this error please (
/showthread.php?tid=385162)
Help me fix this error please -
pln102 - 14.10.2012
Help me fix this
PHP код:
wcrp\utils.pwn(308) : warning 219: local variable "Z" shadows a variable at a preceding level
wcrp\utils.pwn(663) : warning 219: local variable "Z" shadows a variable at a preceding level
Line:308
PHP код:
public SendAreaMessage(Float:radi, Float:X, Float:Y, Float:Z, string[],color)
{
new Float:posx, Float:posy, Float:posz;
new Float:tempposx, Float:tempposy, Float:tempposz;
foreach(Player,i)
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (X -posx);
tempposy = (Y -posy);
tempposz = (Z -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, color, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, color, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, color, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, color, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, color, string);
}
}
return 1;
}
Line 663:
PHP код:
#define DEG_TO_RAD(%1) %1*(3.14159265 / 180)
stock movePlayerBack(playerid, Float:distance) {
new Float:X,Float:Y,Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
A += 90;
A = DEG_TO_RAD(A);
X -= floatcos(A) * distance;
Y -= floatsin(A) * distance;
SetPlayerPos(playerid, X, Y, Z);
return 1;
}
Line 308:
PHP код:
public SendAreaMessage(Float:radi, Float:X, Float:Y, Float:Z, string[],color)
Line 663:
PHP код:
new Float:X,Float:Y,Float:Z, Float:A;