3 Warnings in MapIcons.inc - 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: 3 Warnings in MapIcons.inc (
/showthread.php?tid=104229)
3 Warnings in MapIcons.inc -
Rainer - 23.10.2009
3 Warnings in MapIcons.inc
Код:
C:\Users\Rainer\Desktop\Mein GTA-Server\USA State\pawno\include\MapIcons.inc(272) : warning 219: local variable "x2" shadows a variable at a preceding level
C:\Users\Rainer\Desktop\Mein GTA-Server\USA State\pawno\include\MapIcons.inc(272) : warning 219: local variable "y2" shadows a variable at a preceding level
C:\Users\Rainer\Desktop\Mein GTA-Server\USA State\pawno\include\MapIcons.inc(272) : warning 219: local variable "z2" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
MapIcons.inc(269 - 272)
Код:
(Line 269) stock GetDistanceToMapIcon(playerid, iconid)
(Line 270){
(Line 271) new Float:x1,Float:y1,Float:z1;
(Line 272) new Float:x2,Float:y2,Float:z2;
(Line 273) new Float:output;
(Line 274) GetPlayerPos(playerid, x1, y1, z1);
(Line 275) GetMapIconPos(iconid, x2, y2, z2);
(Line 276) output = floatsqroot(floatpower(floatabs(floatsub(x2, x1)), 2)+floatpower(floatabs(floatsub(y2, y1)), 2));
(Line 277) return floatround(output);
}
Re: 3 Warnings in MapIcons.inc -
Correlli - 23.10.2009
You already have 3 global-variables with the same name, re-name the local ones.