luapp has been updated to 1.1.0!, new additions:- --pp:ifdef definition: Similar to a ignore zone, but ignores if "definition" is not defined
- --pp:ifndef definition: Reverse of "ifdef"
- --pp:if "lua expression": Similar to a ignore zone but ignores if "lua expression" returns false
- --pp:ifn "lua expression": Reverse of "if"
- --pp:else: Reverses a ignore zone.
- Fixed preprocessor commands running on ignore zones.
Here is a example of the ifs
--pp:if 1 == 1
print("1 equals 1!")
--pp:ignoreend
--pp:define DO_PRINT_THAT true
--pp:ifdef DO_PRINT_THAT
print("dpt is defined")
--pp:ignoreend
--yes, ifs also allow the defines with the lua code.
--pp:if DO_PRINT_THAT
print("dpt on")
--pp:else
print("dpt off")
--pp:ignoreend
Edited by Admicos, 05 November 2016 - 07:36 AM.