C:\Users\aa\Desktop\Server\pawno\include\yom_buttons.inc(99) : warning 219: local variable "Speed" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
stock GetButtonPos(buttonid, &Float:X, &Float:Y, &Float:Z, &Float:Angle = 0.0)
{
new objectid = GetButtonObjectID(buttonid);
GetObjectPos(objectid, X, Y, Z);
GetObjectRot(objectid, Angle, Angle, Angle);
}
stock SetButtonPos(buttonid, Float:X, Float:Y, Float:Z, Float:Angle = 0.0)
return CallRemoteFunction("FS_SetButtonPos", "iffff", buttonid, X, Y, Z, Angle);
warning 219: local variable "VARIABLE NAME GOES HERE" shadows a variable at a preceding level |
new speed;//This can be accessed anywhere in the script (it's a global variable)
MyFunction(){
new speed;//This can only be accessed within the function "MyFunction"
//As there is a global variable with the same name, you will get a warning
}
MyOtherFunction(speed){
//Here you will get a warning because the function is creating a variable with the name speed to store it's parameter
if(some condition){
new speed;
//Here you will get another warning as there are two variables with the same name still in use
}
}