SA-MP Forums Archive
Updating from old dini to dini2 showing warning? - 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: Updating from old dini to dini2 showing warning? (/showthread.php?tid=663770)



Updating from old dini to dini2 showing warning? - mmlinaric - 10.02.2019

Hello!
So, I updated from old dini to dini2 (because of speed).
When I try to compile i get this warning:
PHP код:
C:\Users\Test\Desktop\RolePlay\pawno\include\Dini2.inc(200) : warning 219local variable "NULL" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright 
(c1997-2016ITB CompuPhase
1 Warning

I found dini2 on this GitHub link:
https://github.com/Agneese-Saini/SA-...clude/dini2.in

And please don't tell me dini is outdated or something like that. I know that.
Thank you!


Re: Updating from old dini to dini2 showing warning? - Nero_3D - 10.02.2019

Quote:
Originally Posted by pawn -ang.pdf
warning 219: local variable identifier shadows a symbol at a preceding level

A local variable has the same name as a global variable, a function, a function argument, or a local variable at a lower precedence level. This is called "shadowing", as the new local variable makes the previously defined function or variable inaccessible
Means you got a variable named "NULL" somewhere else in your script


Re: Updating from old dini to dini2 showing warning? - mmlinaric - 10.02.2019

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Means you got a variable named "NULL" somewhere else in your script
Quote:

stock PreloadAnimations(playerid)
{
for (new i = 0; i < sizeof(g_aPreloadLibs); i ++) {
ApplyAnimation(playerid, g_aPreloadLibs[ i ], "null", 4.0, 0, 0, 0, 0, 0, 1);
}
return 1;
}

This maybe?
That's only NULL i found in the script.