Raised This Month: $52 Target: $400
 13% 

new syntax consts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Grzyboo
Junior Member
Join Date: Apr 2011
Old 08-04-2019 , 17:06   new syntax consts
Reply With Quote #1

How do i declare const arrays in the "new" syntax?


Code:
new const String:CONST_STRING_1[] = "models/1.mdl";    // compiles
const char[] CONST_STRING_2 = "models/2.mdl";          // error 001: expected token: "=", but found "["
const char CONST_STRING_3[] = "models/3.mdl";          // error 001: expected token: "=", but found "["
Same with ints
Code:
new const COLOR_RED[4] = {255, 0, 0, 255};      // compiles
const int COLOR_BLUE[4] = {0, 255, 0, 255};     // error 001: expected token: "=", but found "["
Grzyboo is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-04-2019 , 18:50   Re: new syntax consts
Reply With Quote #2

You can't, it was never supported, just previously silently ignored.
__________________
asherkin is offline
Reply


Thread Tools
Display Modes

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 22:17.


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