Global 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: Discussion (
https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Global strings (
/showthread.php?tid=524489)
Global strings -
Jack_Leslie - 07.07.2014
I was just thinking, and I'm unsure of whether this would happen or not - but if you have a one global string at the top of your script, like:
pawn Код:
#include <a_samp>
new string[64];
Instead of in a command each time, what would happen if say, player 1 opened a dialog with the formatted string that said "hi", and player 2 opened another dialog at the
exact same time, or
milliseconds apart with the formatted string "hi there", would it possibly say hi for both players or hi there for both players? Not sure if I'm explaining my self properly, but you know.
Respuesta: Global strings -
Leon9741 - 07.07.2014
That cant happen because the instructions are readed one to one.
Sorry 4 my english
Re: Global strings -
Virtual1ty - 07.07.2014
If that string will never change during execution, make it "stock const" and use it anywhere, but if the string will get overwritten sometime during execution I recommend using a local string variable.