Setting bool array to false
#1

Will this work?
Код:
new bool:fo_moved[32]=false;
I want to set all the bools to false
Reply
#2

defaults are zero
PHP код:
new bool:fo_moved[32]; 
Reply
#3

When initialized variables - given no explicit value - will have the value 0/false. So in this case it's not even necessary. If you still want to explicitly initialize an entire array you can use the progressive initializer, also known as the ellipsis operator: ... (literally three dots).

PHP код:
new bool:fo_moved[32] = {false, ...}; 
For more information see pawn-lang.pdf, section Data and declarations, subsection Progressive initiallers for arrays.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)