Help About Virtual World.
#7

Quote:
Originally Posted by Grimrandomer
Посмотреть сообщение
pawn Код:
for( new v = 1; v <= MAX_VEHICLES; v++ ) DestroyVehicle( v );
Otherwise you will miss id 2000
If you do not want to crash your server, then don't do that!

MAX_VEHICLES is defined as 2000 which means 0-1999. However, the vehicleid starts from 1.

If you have an array, let's say:
pawn Код:
new
    Check_Something[ MAX_VEHICLES ]
;

// somewhere
for( new v = 1; v <= MAX_VEHICLES; v++ ) Check_Something[ v ] = 0;
When 2000 gets passed in the index, it will cause index out of bounds because it expected the max value to be 1999.
Reply


Messages In This Thread
Help About Virtual World. - by MAFIAWARS - 27.09.2013, 14:23
Re: Help About Virtual World. - by MAFIAWARS - 27.09.2013, 15:33
Re: Help About Virtual World. - by Unri - 27.09.2013, 15:44
Re: Help About Virtual World. - by MAFIAWARS - 27.09.2013, 15:56
Re: Help About Virtual World. - by Konstantinos - 27.09.2013, 15:58
Re: Help About Virtual World. - by Grimrandomer - 27.09.2013, 16:00
Re: Help About Virtual World. - by Konstantinos - 27.09.2013, 16:07
Re: Help About Virtual World. - by Grimrandomer - 27.09.2013, 16:51
Re: Help About Virtual World. - by Konstantinos - 27.09.2013, 17:01
Re: Help About Virtual World. - by Grimrandomer - 27.09.2013, 17:10

Forum Jump:


Users browsing this thread: 3 Guest(s)