Warning 202 pawn help
#1

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
Reply
#2

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..
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)