Ok, now I'm more lost. Perhaps because I'm sick and not thinking straight at this time (I'm outta DayQuil
)
lua Code:
CNames_Options.enemy = (CNames_Options.enemy == nil) and true or CNames_Option.enemy
I think I'm understanding this wrong. From the looks, it looks like the first comparison is looking for
nil and
true, which is impossible as far as I know; Some cannot be true
and not exist.
lua Code:
CNames_Options.enemy = not (CNames_Options.enemy == false)
I'm not even sure how this works. Again, using terms of the boolean values, I read this as
false = not false and
true = not false. I think it's the formatting that I don't seem to understand.
lua Code:
if CNames_Options.enemy == nil then
CNames_Options.enemy = true
end
This is the format I'm used to, I've just been trying to eliminate the need for 10,000 if-then-else statements.
What I'm wondering at this point is if this is just the behaviour when using Boolean. Because from what I've used before
CNames_Options = CNames_Options or {} works the way I'm thinking it would.