Raised This Month: $51 Target: $400
 12% 

Solved String array problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 00:34.


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