21.12.2013, 19:10
Due to the architecture of the public functions, it's only possible to return one-cell values (integers, characters, float values) since they were specifically designed to do so. You'll have to stick to using properties, for now.
I was actually writing a script that modifies the return address of a function to return a string, but it only returned the first character, which made me believe that you can't return strings with them at all, sorry to say (perhaps, I can work something out).
That won't work. You can't return multiple values in PAWN. That will just return "1".
That will keep calling the function until the string has reached it's end. It's horribly inefficient, especially if you want to return strings with 100+ characters.
I was actually writing a script that modifies the return address of a function to return a string, but it only returned the first character, which made me believe that you can't return strings with them at all, sorry to say (perhaps, I can work something out).
Quote:
I did and got no errors.
Here's how i've done it (gotta say i kinda borrowed the idea while reading one of ******'s posts) Код:
public Anypublic(playerid) { new string[24]; GetPlayerName(playerid, string, 24); return string, 1; } |
Quote:
or something like this...?
pawn Код:
|