Compiling question - 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: Compiling question (
/showthread.php?tid=578212)
Compiling question -
Brys - 17.06.2015
Is it possible to compile a selected lines only ? if so show me how
Re: Compiling question -
GloomY - 17.06.2015
You mean you have a large script and from that large script you want to compile only 3-4 lines, for example?
It is possible, but you have to be careful will it work.
Use this: /* and */
Example:
PHP код:
new tmp[4], Float: tmp2[4]/*, query[128]*/;
query[128] will be ignored by the compiler because it's inside */ and */
Re: Compiling question -
SpaceX - 17.06.2015
Quote:
Originally Posted by GloomY
Use this: */ and */
query[128] will be ignored by the compiler because it's inside */ and */
|
Isn't commenting /* and */? (I'm not sure since I haven't touched the compiler in a long time)
You could add a // before your lines but make sure all your lines do change colour indicating that they have been commented.
Re: Compiling question -
GloomY - 17.06.2015
Commenting is when you use //
And it is only used for a single line, while /* and */ can be used for a whole script if you want to.
Re: Compiling question -
SpaceX - 17.06.2015
Quote:
Originally Posted by GloomY
*/ and */
|
It is /* and */..
You can comment out the lines below using // by making it a block and commenting out that block.
I have tried it on a C IDE. On Pawno? idk.
Re: Compiling question -
Brys - 17.06.2015
For example, i want all the lines saved but the script is large yes, i need to compile only the selected lines, like texture edit, if i added the
that will skip the lines i need.
Re: Compiling question -
AndySedeyn - 17.06.2015
Quote:
Originally Posted by GloomY
Commenting is when you use //
And it is only used for a single line, while /* and */ can be used for a whole script if you want to.
|
/* {CODE} */ Is also commenting. It is used for multi-line commenting or to comment mid-code.
Comments don't get compiled because the compiler ignores comments simply because comments are there for humans to read, not for the compiler.
EDIT: I should have mentioned what Pottus stated.
Re: Compiling question -
Pottus - 17.06.2015
This doesn't make much sense to do this unless you're trying to compile different compiles of a script for one reason or another. All these suggestions of using commenting bullshit is making me sick this is what you would use the pre-processor for and also your script should be divided into modules you can easily make most modules self compiling by again using the pre-processor #define / #if / #endif