SA-MP Forums Archive
A Very Foolish Question... - 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)
+--- Thread: A Very Foolish Question... (/showthread.php?tid=478516)



A Very Foolish Question... - AryanV - 30.11.2013

What Does String means or can we use same number of stings 2 times.......


Re: A Very Foolish Question... - Konstantinos - 30.11.2013

https://sampwiki.blast.hk/wiki/Scripting_Basics#Strings

Yes, you can re-use a string. For example:
pawn Код:
new
    sz_Str[ 128 ]
;
format( sz_Str, sizeof( sz_Str ), ... ); // some text and arguments..
SendClientMessage( playerid, -1, sz_Str ); // formating sz_Str and send it to playerid
format( sz_Str, sizeof( sz_Str ), ... ); // some other text and arguments..
SendClientMessage( id, -1, sz_Str ); // re-formatting sz_Str with the new text and send it to id



Re: A Very Foolish Question... - Firewire - 30.11.2013

A string is a number of characters formed to make a "string". Strings can include letters, symbols, numbers and other special characters.

String = "An example of a string would be a sentence like I am typing now."

You can format a string twice in one chunk of code, nothing is there to stop you.

Hope this helps.
-Firewire.