Grouping cars
#3

Quote:
Originally Posted by HondaCBR
Посмотреть сообщение
I have 50 cars Car[0], Car[1] and so on till Car[49]

how can I make
pawn Код:
new vehicleid = /* Car[0] - Car[49] without listiing all of them 1 by 1*/


At the end vehicleid will be just Car[49], because it's not an array.

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
This?

pawn Код:
new vehicleid[50];

for(new i; i < sizeof Car; i++)
    vehicleid[i]= Car[i];
It will work, but at the end it's useless .-.
And if he does that into a callback event like OnPlayerEnterVehicle(playerid, vehicleid ....) it will give an error, because vehicleid is not defined as an array... ("error 028: invalid subscript (not an array or too many subscripts): "vehicleid"") and other 3 errors more

I think HondaCBR didn't make the right question...
Can you show us all the callback that contains the code you need?
Reply


Messages In This Thread
Grouping cars - by HondaCBR - 13.04.2012, 14:54
Re: Grouping cars - by ViniBorn - 13.04.2012, 15:20
Re: Grouping cars - by Sasino97 - 13.04.2012, 15:32
Re: Grouping cars - by ViniBorn - 13.04.2012, 15:42
Re: Grouping cars - by HondaCBR - 13.04.2012, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)