Help with a stock...
#1

I'm having a bit of trouble.
I have this stock made by Jeffrey:
pawn Код:
stock GetCarIDFromPlayer_Enum(playerid)
{
    for(new i=0; i<sizeof(CarInfo); i++)
    {
        if(!strcmp(CarInfo[i][vOwner], PlayerName(playerid))) return i; //Returns the ID of the Ownership
    }
    return -1;
}
I need to detect if it returned -1...
I've tried multiple things before requesting help.

I tried:
Код:
if(setcar == -1)
Код:
if(!setcar)
( setcar being new setcar = GetCarIDFromPlayer_Enum(playerid); )

But none of them have worked. So basically I wanna ask if setcar returned -1 do this, else do that.
Reply


Messages In This Thread
Help with a stock... - by Jack_Leslie - 02.10.2011, 12:25
Re: Help with a stock... - by Pharrel - 02.10.2011, 12:32
Re: Help with a stock... - by Jack_Leslie - 02.10.2011, 12:35
Re: Help with a stock... - by Pharrel - 02.10.2011, 12:38
Re: Help with a stock... - by DRIFT_HUNTER - 02.10.2011, 12:59

Forum Jump:


Users browsing this thread: 1 Guest(s)