Quote:
Originally Posted by Vince
Improvement: This
pawn Code:
for(new i=0;i<MAX_VEHICLES;i++) { fuel[i] = 100; //sets every car's fuel to 100 in a loop }
can just as easily be done in the declaration itself by doing:
pawn Code:
new fuel[MAX_VEHICLES] = {100, 100, ...}; // exactly like this. This will set them all to 100
|
I tried that
pawn Code:
new fuel[MAX_VEHICLES] = 100;
But got an error, symbol never declared "fuel" so thats why i did it this way