Pawno Error
#1

i got this error i asked alot and i cant fix it
pawn Код:
C:\Users\Daoud\Desktop\Pilots heaven\gamemodes\PH.pwn(3978) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Users\Daoud\Desktop\Pilots heaven\gamemodes\PH.pwn(3985) : error 022: must be lvalue (non-constant)
C:\Users\Daoud\Desktop\Pilots heaven\gamemodes\PH.pwn(3985) : warning 215: expression has no effect
C:\Users\Daoud\Desktop\Pilots heaven\gamemodes\PH.pwn(3988) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Pilots heaven\gamemodes\PH.pwn(3978) : warning 204: symbol is assigned a value that is never used: "ID"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
here are the lines;
pawn Код:
GetNearestCoordsForPlayer(playerid)
{
    new
    Float:DefDist = 999999999.9,
    Float:CurDist,
    ID = -1;
    for(new d; d != sizeof(ALocations); d++)
    {
        CurDist = GetPlayerDistanceFromPoint(playerid, ALocations[d][LocX], ALocations[d][LocY], ALocations[d][LocZ]);
        if(CurDist < DefDist)
        {
            DefDist = CurDist;
            ID = d;
        }
   }
   return ID;
}
Reply


Messages In This Thread
Pawno Error - by Geeboi_Mehdi - 21.04.2013, 23:07
Re: Pawno Error - by JustinAn - 22.04.2013, 00:44
Re: Pawno Error - by Geeboi_Mehdi - 22.04.2013, 01:18
Re: Pawno Error - by hillko - 22.04.2013, 01:29
Re: Pawno Error - by Geeboi_Mehdi - 22.04.2013, 02:52
Re: Pawno Error - by Emmet_ - 22.04.2013, 02:59
Re: Pawno Error - by Geeboi_Mehdi - 22.04.2013, 03:06
Re: Pawno Error - by Emmet_ - 22.04.2013, 03:14
Re: Pawno Error - by Geeboi_Mehdi - 22.04.2013, 03:18

Forum Jump:


Users browsing this thread: 1 Guest(s)