foreach Problem
#1

Hello I'm Working with foreach atm. But i have a little problem:

Look i have this:

pawn Код:
new Iterator:AllVehicles<MAX_VEHICLES>;

//(And in a Function:)
foreach(AllVehicles, i)
But it gives a Warning. And it doesn't work

Код:
warning 203: symbol is never used: "YSI_gCAllVehicles"
Does Somebody knows how to fix it.. So i can use foreach Properly!

Thanks,
Gforcez
Reply
#2

in which callback is it, and in which function?
give the code, that makes it more clear
Reply
#3

Quote:
Originally Posted by PhantomDot1
Посмотреть сообщение
in which callback is it, and in which function?
give the code, that makes it more clear

Its under OnGameModeInit:

Код:
foreach(AllVehicles, i)
{
VehicleStarted[i] = false;
VehicleFuel[i] = Standard_Fuel;
}
Reply
#4

You have to add elements into it.

pawn Код:
Itter_Add(AllVehicles, 1);
If you don't know what this does, just make a simple loop.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)