SA-MP Forums Archive
A stupid question. Hope someone can answer - 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: A stupid question. Hope someone can answer (/showthread.php?tid=288057)



A stupid question. Hope someone can answer(variables being shadowed) - Soap_MacTavish - 06.10.2011

The compiler complains about variables being shadowed, what does this mean?

Sorry for my bad English



Re: A stupid question. Hope someone can answer - Dripac - 06.10.2011

That means that your code which you didn't tell us, is bad.


Re: A stupid question. Hope someone can answer - sansko - 06.10.2011

that means that you used for example this
pawn Код:
new x;

OnPlayerConnect(playerid)
{
     new x; // this one is being shadowed and will not work properly
     x = playerid;
     return 1;
}
you can fix this by changing the name of the shadowed variable.

this question is not that stupid, i guess you are still learning


Re: A stupid question. Hope someone can answer - Soap_MacTavish - 06.10.2011

Thanks. I can write some program.But...my English is bad.So I don't know some word's meaning...