08.08.2010, 11:10
I think he was wondering why you just didn't use an undetermined array size in your function definition (i.e. string[]). I believe the answer for that is that Pawn doesn't like unknown sized arrays being returned.
However, if you don't want to limit the string length then don't return an array and take advantage that arrays are always passed by reference in Pawn i.e the assignment in the function happens outside it also. The function could be modified for those who don't want the limit, but it would have to be used like GetPlayerName which means it couldn't be used 'like' a read-only variable.
****** already touched on this, so just remove the 'return' statement and remove the 128 from 'string[128]'.
However, if you don't want to limit the string length then don't return an array and take advantage that arrays are always passed by reference in Pawn i.e the assignment in the function happens outside it also. The function could be modified for those who don't want the limit, but it would have to be used like GetPlayerName which means it couldn't be used 'like' a read-only variable.
****** already touched on this, so just remove the 'return' statement and remove the 128 from 'string[128]'.