SA-MP Forums Archive
Please help with warning 219 - 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: Please help with warning 219 (/showthread.php?tid=314709)



Please help with warning 219 - [DC] - 31.01.2012

Code:
PHP код:
stock TimeStamp()
{
    new 
time GetTickCount() / 1000;
    return 
time;

Error:
PHP код:
\pawno\include\lfuncs.inc(466) : warning 219local variable "time" shadows a variable at a preceding level 
Error line:
PHP код:
new time GetTickCount() / 1000



Respuesta: Please help with warning 219 - [Nikk] - 31.01.2012

If im not wrong, that means that you are defined a variable already defined.
And is not an error, is a warning, you can run the script with that warn,


Re: Please help with warning 219 - Snowman12 - 31.01.2012

pawn Код:
stock TimeStamp()
{
    new time;
    time = GetTickCount() / 1000;
    return time;
}
Any better?


Re: Please help with warning 219 - [HiC]TheKiller - 31.01.2012

pawn Код:
#define GetTimeStamp() (GetTickCount() / 1000)
Define would be perfect + it's faster.


Respuesta: Please help with warning 219 - [DC] - 31.01.2012

Quote:
Originally Posted by [Nikk]
Посмотреть сообщение
If im not wrong, that means that you are defined a variable already defined.
And is not an error, is a warning, you can run the script with that warn,
I think you were right, thanks for helping guys