SA-MP Forums Archive
Const - 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: Const (/showthread.php?tid=303050)



Const - omer5198 - 11.12.2011

can someone explain to me why sometimes people add "const" to their stocks, and sometimes don't?
(Ex: stock(Name[]) ; stock(const Name[]))


Re: Const - THE_KNOWN - 11.12.2011

once a const is declared, you cannot change its value. Hence the name. they use stock(const Name[])) so that Name cannot change anywhere in the code