local variable
#1

pawn Код:
C:\Users\gtfytgfy\Desktop\LSS-RP\gamemodes\LSS-RP.pwn(57750) : warning 219: local variable "rx" shadows a variable at a preceding level
C:\Users\gtfytgfy\Desktop\LSS-RP\gamemodes\LSS-RP.pwn(57750) : warning 219: local variable "ry" shadows a variable at a preceding level
C:\Users\gtfytgfy\Desktop\LSS-RP\gamemodes\LSS-RP.pwn(57750) : warning 219: local variable "rz" shadows a variable at a preceding level
pawn Код:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
Reply
#2

any help??
Reply
#3

Код:
shadows a variable at a preceding level
the code clearly says it all

somewhere in your script, "rx","ry" and "rz" are already defined.
You can't use the same declaration 2 times.

for example:
Код:
new abc;
new abc;
wont work,
while
Код:
new abc;
new abcde;
will compile successfully

what you have 2 do now is, rename "rx" and the other stuff.
Reply
#4

Find on the top if u have already defined new rx , ry and rz , etc. already. Or somewhere else which is not proper place to place these, and after finding out u need to delete them otherwise u get these errors.
Edit: for e.g.
pawn Код:
// u have place string on the top after includes like that :-
#include <a_samp>

new string;
// and now if you try again to use it.
Public OnPlayerSpawn
{
 new string;
 return 1;
}
 // then u will get this error shadows at preceding level ..... Bla bla bla
// to fix it u need to delete 2nd new string; and error willl resolve.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)