warning help
#1

warning 202: number of arguments does not match definition

problem is on this line
PHP код:
 "if (IsPlayerInRangeOfActor(playerid, LSAMMU_ACTOR, SFAMMU_ACTOR, LVAMMU_ACTOR))" //cuz i added LVAMMU_ACTOR 
PHP код:
stock InRangeOfAmmuActors(playerid)
{
    if (
IsPlayerInRangeOfActor(playeridLSAMMU_ACTORSFAMMU_ACTORLVAMMU_ACTOR))
    {
        return 
1;
    }
    return 
0;

when i try without LVAMMU_ACTOR it work good

PHP код:
stock InRangeOfAmmuActors(playerid)
{
    if (
IsPlayerInRangeOfActor(playeridLSAMMU_ACTORSFAMMU_ACTOR))
    {
        return 
1;
    }
    return 
0;

here is IsPlayerInRangeOfActor

Quote:

stock IsPlayerInRangeOfActor(playerid, actorid, Float:radius = 3.0)
{
new Float,
Float:y,
Float:z;

if (GetActorPos(actorid, x, y, z))
{
return IsPlayerInRangeOfPoint(playerid, radius, x, y, z);
}
return 0;
}

Reply
#2

The warning is pretty straightforward, is not it?
Quote:

number of arguments does not match definition

The arguments you must to pass the function is what the function's header tells you to:
PHP код:
IsPlayerInRangeOfActor(playeridactoridFloat:radius 3.0
If what you want to do is to check if the player is near one or more actors, add an 'or' ( || ) separator in that conditional statement and add as many IsPlayerInRangeOfActor functions as you want, complying with the required arguments.

I can't give you an example because the function itself is pretty straightforward, as i said before.
Reply
#3

nvm , fixed , thanks for the info
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)