PHP Code:
public getstring(CaseNum, String:str[], len)
This should be intuitive. You use
FormatEx in your code - what does this native do? You give it a string and the string's length, and it "returns" output based on implementation. By the same reasoning, surely you can work out that you needed to do the same, that is, change your function to accept a string, and the string's length.
PHP Code:
new String:mystring[64]
public getstring(CaseNum, String:str[], len)
{
switch(CaseNum)
{
case 1: FormatEx(str,len,"case1")
case 2: FormatEx(str,len,"case2")
//...etc
}
}
//Usage: getstring(number, mystring, sizeof(mystring))
__________________