Is there a way - rep ++ question
#8

Quote:
Originally Posted by Raweresh
Посмотреть сообщение
I think I have better way to do it:
Код:
public OnTrailerUpdate(playerid, vehicleid)
{
	for(new x, y = MAX_VEHICLES; x < y; x++)
	{
	    if(IsTrailerAttachedToVehicle(x) && GetVehicleTrailer(x) == vehicleid))
	    {
	        //trailer is attached
	        return 1;
	    }
	}
	//trailer not attached
	return 1;
}
I get some erros, first i get assumed 0 cuz () i put them to [] and now i have:
pawn Код:
forward OnTrailerUpdate(playerid, vehicleid);
public OnTrailerUpdate(playerid, vehicleid)
{
    for(new x, y = MAX_VEHICLES; x < y; x++)
    {
        if(IsTrailerAttachedToVehicle[x] && GetVehicleTrailer[x] == vehicleid))
        {
            return 1;
        }
    }
    DestroyVehicle(trucker[playerid]);
    return 1;
}
And errors :
pawn Код:
C: x(2328) : error 028: invalid subscript (not an array or too many subscripts): "IsTrailerAttachedToVehicle"
C: x(2328) : warning 215: expression has no effect
C: x(2328) : error 001: expected token: ";", but found "]"
C: x(2328) : error 029: invalid expression, assumed zero
C: x(2328) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Is there a way - rep ++ question - by buburuzu19 - 15.12.2014, 17:51
Re: Is there a way - rep ++ question - by Kruno88 - 15.12.2014, 17:52
Re: Is there a way - rep ++ question - by Raweresh - 15.12.2014, 17:56
Re: Is there a way - rep ++ question - by buburuzu19 - 15.12.2014, 18:27
Re: Is there a way - rep ++ question - by Abagail - 15.12.2014, 18:40
Re: Is there a way - rep ++ question - by Raweresh - 15.12.2014, 19:21
Re: Is there a way - rep ++ question - by buburuzu19 - 16.12.2014, 06:59
Re: Is there a way - rep ++ question - by buburuzu19 - 16.12.2014, 07:03
Re: Is there a way - rep ++ question - by Raweresh - 16.12.2014, 07:06
Re: Is there a way - rep ++ question - by buburuzu19 - 16.12.2014, 07:17

Forum Jump:


Users browsing this thread: 2 Guest(s)