This is quite a noob question but how can I set multiple variables at the same time?
if (light_level < 10)
{screen_brightness = "DIM (50/255)" AND global_nightmode = 1
};
This code obviously doesn't work, so what's wrong with it?
Setting multiple variables
Moderator: Martin
Re: Setting multiple variables
Hi,
It is much easier...
if (light_level < 10)
{
screen_brightness = "DIM (50/255)"
global_nightmode = 1
};
AND operator is only for boolean. For example
if (light_level<10 and dark_level>100)
{}
Regards
Andy
It is much easier...
if (light_level < 10)
{
screen_brightness = "DIM (50/255)"
global_nightmode = 1
};
AND operator is only for boolean. For example
if (light_level<10 and dark_level>100)
{}
Regards
Andy
Re: Setting multiple variables
Yours is not perfect either. It needs half comma(or whatever ";" is called in english) on line changes but you gave me the right idea. The simplest of solutions is sometimes the best and this might be the only one I didn't try.
Thanks for your input.
Thanks for your input.
Re: Setting multiple variables
Ooops hehe
You are right. I copied/pasted your snippet and only replaced AND by carridge return/line feedback
Good luck for next code lines
You are right. I copied/pasted your snippet and only replaced AND by carridge return/line feedback
Good luck for next code lines