View Single Post
Author Message
Grzyboo
Junior Member
Join Date: Apr 2011
Old 08-04-2019 , 16: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