SA-MP Forums Archive
Some warnings - 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: Some warnings (/showthread.php?tid=83183)



Some warnings - radi - 23.06.2009

how can i get these warnings awey ?
the dont do anything i can compile and use it
but i want the warnings gone

Код:
C:\Documents and Settings\Timmie\Bureaublad\sa-mp\samp zooi\pawno\include\mapicon.inc(272) : warning 219: local variable "x2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\sa-mp\samp zooi\pawno\include\mapicon.inc(272) : warning 219: local variable "y2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\sa-mp\samp zooi\pawno\include\mapicon.inc(272) : warning 219: local variable "z2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\sa-mp\samp zooi\pawno\include\morphinc.inc(3) : warning 219: local variable "x2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\sa-mp\samp zooi\pawno\include\morphinc.inc(3) : warning 219: local variable "y2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\sa-mp\samp zooi\pawno\include\morphinc.inc(3) : warning 219: local variable "z2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\second life samp server\gamemodes\new(1).pwn(24818) : warning 219: local variable "x2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\second life samp server\gamemodes\new(1).pwn(24818) : warning 219: local variable "y2" shadows a variable at a preceding level
C:\Documents and Settings\Timmie\Bureaublad\second life samp server\gamemodes\new(1).pwn(24818) : warning 219: local variable "z2" shadows a variable at a preceding level



Re: Some warnings - Grim_ - 23.06.2009

We'd have to see yoru script to help.
You create the variables "x2, y2"ect in the same callback. Make change them to somethign different, like X2 Y2, x, y, ect, ect.
Or you could just make them global variables. ((put them at top of the script after #include <a_samp> but before main() )


Re: Some warnings - radi - 23.06.2009

Quote:
Originally Posted by Swift_
We'd have to see yoru script to help.
this line 272
pawn Код:
forward OnPlayerUnjail(playerid);
and the lines at 24818

pawn Код:
public Float:GetDistanceBetweenPlayers(p1,p2)
{
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
    {
        return -1.00;
    }
    GetPlayerPos(p1,x1,y1,z1);
    GetPlayerPos(p2,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}



Re: Some warnings - Grim_ - 23.06.2009

Dont' listen to my older posts, just saw where the errors came from.
Go into the two includes, and change the varibles there to something else.


Re: Some warnings - radi - 23.06.2009

Quote:
Originally Posted by Swift_
Dont' listen to my older posts, just saw where the errors came from.
Go into the two includes, and change the varibles there to something else.
how ?
i dont know what to change there


Re: Some warnings - Grim_ - 23.06.2009

In the morphinic include, change the variables "x2, y2" to "XX, YY". Then goto the other include and change "x2, y2" to "XxX, YyY". Or some other name.