14.04.2011, 19:05
I would like to know how to return a string a function, I tried "Char*" but it didn't work.
Thanks!
Thanks!
stock ExampleStock(auto)
{
new stringer[56];
if(auto == 1) { stringer = "Testing No.1"; }
if(auto == 2) { stringer = "Testing No.2"; }
if(auto == 3) { stringer = "Testing No.3"; }
if(auto == 4) { stringer = "Testing No.4"; }
return stringer;
}
If you was to do ExampleStock(2); - It would return the string "Testing No.2"