SA-MP Forums Archive
Packed Strings - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Packed Strings (/showthread.php?tid=132906)



Packed Strings - Nekom - 10.03.2010

I know that I can create packed strings doing for example:
Код:
new 
   string[12 char] = !"Hello";
That becomes
Код:
new 
   string[3] = !"Hello";
But I have some questions...

Can I put ! before "text" in format?
For example:
Код:
new string[24 char];
format(string, sizeof(string), !"Hello by %s", "Peppe");
and...

What are the advantages and disvantages of packed strings?



Re: Packed Strings - Burridge - 10.03.2010

There was a topic by ****** about this (I think it was about not using 256 strings), but it had a little section about Packed Strings as well.


Re: Packed Strings - Nekom - 10.03.2010

I read the ******'s topic about these, but I didn't understand if I can easily edit my code using packed strings and if functions like strcmp, strmid and others work well whit these