Try this code with the -intermediate option.
If you look under ROGame\PreProcessedFiles, you will find:
Odd, isn't it? Now try this:
You get the expected behavior: nothing is outputted to the intermediate file.
Now my question is: WTH? Am I missing something or is the preprocessor broken? In the first code block it seems that the first endif is applied to the 1st if :/
Another oddity... I found this in PlayerController.uc:
`if(`notdefined(FINAL_RELEASE) || `isdefined(RO_))
I assumed that || was supported. But after trying, it seems that it is not. In my code, I had to append both preprocessor commands like this to get the desired behavior:
`if(`notdefined(FINAL_RELEASE)`isdefined(RO_))
It seems that || is considered a string, which makes `if always return true. Any thoughts?
Code:
`if(`isdefined(SomeUndefinedConstant))
`ifndef(ShippingPC)
...
`endif
Some stuff that should not be outputted.
`endif
Code:
Some stuff that should not be outputted.
Code:
`if(`isdefined(SomeUndefinedConstant))
`if(`notdefined(ShippingPC))
...
`endif
Some stuff that should not be here.
`endif
Now my question is: WTH? Am I missing something or is the preprocessor broken? In the first code block it seems that the first endif is applied to the 1st if :/
Another oddity... I found this in PlayerController.uc:
`if(`notdefined(FINAL_RELEASE) || `isdefined(RO_))
I assumed that || was supported. But after trying, it seems that it is not. In my code, I had to append both preprocessor commands like this to get the desired behavior:
`if(`notdefined(FINAL_RELEASE)`isdefined(RO_))
It seems that || is considered a string, which makes `if always return true. Any thoughts?
Last edited: