SA-MP Forums Archive
Possible? Cmd+Define - 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: Possible? Cmd+Define (/showthread.php?tid=209150)



Possible? Cmd+Define - sjvt - 10.01.2011

Is it possible to change a '#define' via command in ingame? I dont think so, but maybe theres a option to do?


Re: Possible? Cmd+Define - Krx17 - 10.01.2011

Depends on what you want to change it to. IE: Integer or String.


Re: Possible? Cmd+Define - Kyosaur - 10.01.2011

Quote:
Originally Posted by Krx17
Посмотреть сообщение
Depends on what you want to change it to. IE: Integer or String.
No, its not possible. Defines are preprocessor text replacements, meaning all they do is replace text during compile time.


You should use a variable instead of a define if you want to change the value during run-time.


Re: Possible? Cmd+Define - JamesC - 10.01.2011

No, its not as #define is handled by the pre-processor (before the script is compiled). Use variables.


Re: Possible? Cmd+Define - sjvt - 10.01.2011

Ok. Thanks for the information.