OFP Rapify formats macro argument parameters
|Category:||Rapify (Dos Tools)|
Spaces, comments are ignored when you pass them as a macro parameter.
Steps to reproduce:
1) Start Eliteness.
2) In options select "Resistance"
3) Create text file and paste:
#define myFunction(arg1,arg2) arg1,arg2
x=myFunction( space ,/* comment */);
4) Binarize it.
x = "space,";
x = " space ,/* comment */";
Updated by mikero about 5 years ago
- Status changed from New to Feedback
the correct syntax for above is
x=myFunction( "space" ,"/* comment */");
this is a typical user error. it is not explicit whether 'my comment' is simply meant to be a description of what the macro does, or, is meant to be passed as a string.
It is fairly clear (to me) that the above is meant to be an argument, but even experienced scripters often misttype a , when they meant ("space")/*, my comment*/
basically, if you're passing strings "say so"
Updated by Faguss about 5 years ago
In OFP strings do not require quotation marks. Game does not process text in the macro bracket, just copies it.