View Single Post
Author Message
ElooKoN
        ^_^
Join Date: Apr 2011
Old 01-24-2017 , 20:25   Garbage when using multidimensional char
Reply With Quote #1

Is it intended behaviour multidimensional chars are created with garbage also when using new instead of decl?

Code

Code:
new MaxParams = 5;
new MaxParamSize = 32;

new String:params[MaxParams][MaxParamSize];

for (new i = 0; i < MaxParams; i++) {
	PrintToServer("Param %d: %s", i, params[i]);
}
Result

Code:
Param 0:
Param 1:
Param 2: *]******************
Param 3: ***************************?*********5******************5?
Param 4: *********z******************z******************z******************z*********

Last edited by ElooKoN; 01-24-2017 at 20:37.
ElooKoN is offline