D
Darren
Guest
I'm adding (imaginary) times and dates to my game and need to say "if month number = 12, or 1, or 2, season = Winter"
I've tried || and or and neither work, do I really have to write my code like
if monthno = 12 season = "Winter";
if monthno = 1 season = "Winter";
if monthno = 2 season = "Winter";
there must be an easier way I can't find in the manual I'm sure! Like a way of going if monthno = 12,1,2 season = "Winter"
Any help appreciated! And this isn't asking for a range by the way, I need specific numbers. (I know if monthno >= 12 && monthno <= 3 would work, but for futureproofing I want to find how to call specific numbers so I could say month 3,7,9 = do this.
I've tried || and or and neither work, do I really have to write my code like
if monthno = 12 season = "Winter";
if monthno = 1 season = "Winter";
if monthno = 2 season = "Winter";
there must be an easier way I can't find in the manual I'm sure! Like a way of going if monthno = 12,1,2 season = "Winter"
Any help appreciated! And this isn't asking for a range by the way, I need specific numbers. (I know if monthno >= 12 && monthno <= 3 would work, but for futureproofing I want to find how to call specific numbers so I could say month 3,7,9 = do this.