Thread: [Solved] String array problem
View Single Post
Author Message
pan0s
Senior Member
Join Date: Nov 2017
Old 04-28-2021 , 12:45   String array problem
Reply With Quote #1

Hi, I want to ask how to declare a 2D string array with initial values on SoucePawn?

on Java, it should be like that
Code:
String[][] g_sItems = 
{
	{"item1",},
	{"item2","item3",}
};
on SoucePawn, I tried

Code:
char g_sItems[][][] = 
{
	{"item1",},
	{"item2","item3",}
};
but the compiler gives me "error 018: initialization data exceeds declared size."

Last edited by pan0s; 03-23-2022 at 13:58.
pan0s is offline