SA-MP Forums Archive
What is warning 219 mean? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is warning 219 mean? (/showthread.php?tid=136337)



What is warning 219 mean? - billy4601 - 24.03.2010

i I create a log file. But i get a warning, What happened?

warning 219: local variable "h" shadows a variable at a preceding level
[pwna]

new pname[256],IP[16];
new h;new mins;new sec;new y,m,d;
new str[256];new stringer[256];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerIp(playerid,IP,16);
getdate(y,m,d);gettime(h,mins,sec);
format(str,256,"-online-[%02d:%02d:%02d]- %s %s %d \r\n",h,mins,sec,IP,pname,playerid);
format(stringer,256,"\/%d-%d-%d player .txt",y,m,d);
new File:FILE = fopen(stringer,io_append);
fwrite(FILE,str);
fclose(FILE);

[/pwan]




Re: What is warning 219 mean? - Fj0rtizFredde - 24.03.2010

That you have "h" defined somewhere else :P Change it to like h2 and change gettime(h to gettime(h2 and so on.. :P


Re: What is warning 219 mean? - billy4601 - 24.03.2010

Quote:
Originally Posted by Fj0rtizFredde
That you have "h" defined somewhere else :P Change it to like h2 and change gettime(h to gettime(h2 and so on.. :P
So, i create some Variable?