SA-MP Forums Archive
What is faster? - 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: What is faster? (/showthread.php?tid=213044)



What is faster? - Alex_Valde - 18.01.2011

So I just wanna know what is faster. (Only for information)

If i make something like this:
pawn Код:
#define NotOnline "This user is not online."
and then show it in client message like:
pawn Код:
SendClientMessage(playerid, RED, NotOnline);
Or just showing it in client message right away, like:
pawn Код:
SendClientMessage(playerid, RED, "This user is not online.");



Re: What is faster? - iggy1 - 18.01.2011

Both the same. The compiler just swaps the define for the text. But if your going to use the same message over and over again use the define because you only need to change one line to change the string. Ofc you knew that, but just saying.


Re: What is faster? - Alex_Valde - 18.01.2011

Quote:
Originally Posted by iggy1
Посмотреть сообщение
Both the same. The compiler just swaps the define for the text.
Ohhh, thanks.