Packed String Support
#1

I've been looking at packed strings a lot recently trying to figure out how useful they'd be. After reading some topics here on the forums, a few people have said that most of the native SA-MP functions don't support packed strings.

I ran this:

pawn Код:
new pStr[9 char] = !"Hello World";
print(pStr);
SendClientMessageToAll(-1, pStr);
It printed the messsage in the console, and also sent the client message. My question: what functions don't support packed strings? I also tested a few (~10) other functions which took string arguments, and they worked fine also..

P.S. Not sure why, but it works when the size is only 9 chars, even though the string is 11 chars. Any lower and it produces the error 'initialization data exceeds declared size'. Can someone explain this?

The only thing I can think of that doesn't support packed strings (at least I don't think so) is format().

EDIT: Just tested format() - seems to work both ways (formatting a packed string with normal strings (and other values i.e. floats/ints) and formatting an unpacked string with a packed string in it (%s)).
Reply


Messages In This Thread
Packed String Support - by MP2 - 27.03.2013, 17:47
Re: Packed String Support - by Vince - 27.03.2013, 18:05
Re: Packed String Support - by MP2 - 30.03.2013, 03:53
Re: Packed String Support - by RajatPawar - 30.03.2013, 08:08

Forum Jump:


Users browsing this thread: 1 Guest(s)