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.
Wolfos
3
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 
JRavey
5
Easy, but likely less interesting.
Jessy
7
Why don’t you just do integer division?