SA-MP Forums Archive
Warning 202 pawn help - 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: Warning 202 pawn help (/showthread.php?tid=326752)



Warning 202 pawn help - RenSoprano - 18.03.2012

Hello I need help with house system but I get stupid error how can I repair it

pawn Код:
forward UpdatePlayersHouseInfo();
public UpdatePlayersHouseInfo()
{
    new str[100]; //The string we are gonna format
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        for(new j = 0; j < MAX_HOUSES; j++)
        {
            if(IsPlayerInRangeOfPoint(j, HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ]) && GetPlayerInterior(i) == HouseInfo[j][hOutsideInt] && GetPlayerVirtualWorld(i) == HouseInfo[j][hOutsideVir]) //HERE IS ERROR
            {
                if(HouseInfo[j][hOwned])
                    format(str, 100, "~w~House owned by ~r~%s", COLOR_YELLOW, HouseInfo[j][hOwner]);
                else
                    format(str, 100, "~w~House for sale!~n~Price: ~g~$%d,-", COLOR_GREEN, HouseInfo[j][hPrice]);
                GameTextForPlayer(i, str, 3000, 3);
            }
        }
    }
    return 1;
}
pawn Код:
C:\Users\home\Desktop\GFHF\gamemodes\rp1.pwn(751) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
If you need to see my enum hInfo reply me


Re: Warning 202 pawn help - Jonny5 - 18.03.2012

IsPlayerInRangeOfPoint expects 5 arguments and you only have 4.

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

also your useing the wrong var for it


if(IsPlayerInRangeOfPoint(j,RANGE ,HouseInfo[j][hEnterX], HouseInfo[j][hEnterY], HouseInfo[j][hEnterZ])


this should be i as it wants a playerid not a houseid,
and add a range your checking for..


Re: Warning 202 pawn help - Shabi RoxX - 18.03.2012

How we known which is LINE 751 ?? just comment that line.