Boolean: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 8: | Line 8: | ||
in config.cpp you need to first declare them for what they really are | in config.cpp you need to first declare them for what they really are | ||
#define true 1 | #define true 1 | ||
#define false 0 | #define false 0 | ||
[[Category: Data Types]] | [[Category: Data Types]] |
Revision as of 23:04, 12 July 2016
Boolean Type
If left unmolested true and false are "strings";
In the scripting language (sqf/sqs) this is fine. The variable is compared as a string "true" or "false" or "bananas"
in config.cpp you need to first declare them for what they really are
#define true 1 #define false 0