Unity tells me Screen.width is "doube" ????

        mbuttonX = Screen.width * 0.1;
	mbuttonY = Screen.height * 0.1;
	mbuttonW = Screen.width * 0.2;
	mbuttonH = Screen.height * 0.2;

these lines of code results in these error messages:

The variables are declared as private integers
What am I doing wrong?

Multiplying an integer by a double or float results in a double or float. You need to convert to integer after the math is done.

Integers can’t handle decimals. I guess you can try casting them as an integer
mbuttonX = int(Screen.width * 0.1);
and so on.

silly me, I tried

but the keyword is AFTER the math, thank you both. Life could be so easy if would just use my brain more often :slight_smile:

Easy, but likely less interesting.

thats definitely true :slight_smile:

Why don’t you just do integer division?