Raised This Month: $32 Target: $400
 8% 

Declaration of arrays? (syntax)


Post New Thread Reply   
 
Thread Tools Display Modes
ProdigySim
SourceMod Plugin Approver
Join Date: Feb 2010
Old 03-27-2011 , 11:45   Re: Declaration of arrays? (syntax)
Reply With Quote #11

This seems to work
Code:
new bool:myArray[16][8] = {true};
Edit: nope, that only works for single-dimension.

This is the best I got
Code:
new bool:myArray[4][8] = {{true}, {true}, {true}, {true}};

Last edited by ProdigySim; 03-27-2011 at 12:04.
ProdigySim is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 03-27-2011 , 13:18   Re: Declaration of arrays? (syntax)
Reply With Quote #12

You can use {{5,6,3,3,6,CONSTANT},...} or anything like that, but you can't use {{1,...},...}.
Two repeaters fuck up in the compiler.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 03-27-2011 , 17:42   Re: Declaration of arrays? (syntax)
Reply With Quote #13

Also using decl instead of new then doing a loop in on plugin start is near identical to a static declaration.
Wazz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode