Global strings
#1

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.
Reply
#2

That cant happen because the instructions are readed one to one.

Sorry 4 my english
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)