Quote:
Originally Posted by Greyscale
Actually yes it is, but without the [0] the compiler errors. And oddly it's returning a random letter, not a the first letter of the string.
|
What errors?
PHP Code:
public OnPluginStart() {
decl String:str[32];
str = SomeFunc();
PrintToServer("Text: %s",str);
}
String:SomeFunc() {
new String:mystr[32] = "oh hai there";
return mystr;
}
This compiles just fine. And runs nicely too.

Also, the compiler throws an error if str[] is too small to hold the return value. Interesting.
EDIT: at least when the array size is 28 or lower... weird.
__________________