Some Help To Learn More
#1

Im Now in creating stocks , but im kind of confuse i did this , if anyone can explain me why its not returning nothing (the ґiґ)

pawn Код:
stock nearestwanted(playerid)
{
    new Float:x, Float:y, Float:z;
    new ii;
    GetPlayerPos(playerid, x, y, z);
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if (IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z) && GetPlayerWantedLevel(i) >= 3)
        {
            printf("Player %d is The Nearest Wanted Level", i);
            ii = i;
            return i;
        }
        else
        {
            printf("No Wanted Level Near");
            ii = 0;
            return i;
        }
    }
    return ii;
}
my command
pawn Код:
command(wanted, playerid, params[])
{
    new string[250];
    nearestwanted(playerid);
    if(ii > 0)
    {
        format(string, sizeof(string), "* Nearest Wanted: %s", ii);
        SendClientMessage(playerid, -1 ,string);
    }
    else
    {
        SendClientMessage(playerid, -1, "No Wanted Level Near");
    }
    return 1;
}
And my errors are this
pawn Код:
(188) : error 017: undefined symbol "ii"
(190) : error 017: undefined symbol "ii"
pawn Код:
188: if(ii > 0)
    {
  190: format(string, sizeof(string), "* Nearest Wanted: %s", ii);
        SendClientMessage(playerid, -1 ,string);
    }
Reply


Messages In This Thread
Some Help To Learn More - by Chris1337 - 06.07.2012, 17:08
Respuesta: Some Help To Learn More - by Jovanny - 08.07.2012, 18:45
Re: Some Help To Learn More - by Roko_foko - 08.07.2012, 18:54

Forum Jump:


Users browsing this thread: 1 Guest(s)