05.01.2014, 18:21
Quote:
I expected to see the other use of the ellipsis operator; array initialization. Perhaps you could do a section on that, too?
|
pawn Code:
/*
0xFF = 255
INVALID_MENU = 255
INVALID_GANG_ZONE = -1
INVALID_PLAYER_ID = 65535
INVALID_VEHICLE_ID = 65535
INVALID_OBJECT_ID = 65535
INVALID_TEXT_DRAW = 65535
*/
new
array[ 4 ] = {0xFF, ... } //Mostly used in arrays
;
main()
{
printf("%i | %i | %i | %i", array[ 0 ], array[ 1 ], array[ 2 ], array[ 3 ]);
array[ 0 ] = 1, array[ 1 ] = 2, array[ 2 ] = 3, array[ 3 ] = 4;
printf("%i | %i | %i | %i", array[ 0 ], array[ 1 ], array[ 2 ], array[ 3 ]);
}
pawn Code:
255 | 255 | 255 | 255
1 | 2 | 3 | 4