[Explanation of error.][1] Maybe you should try to understand it instead of getting others to do stuff for you.
CountSeconds = CountSeconds + (CountMinutes * 60); //You should multiply here not sum
//But what is the point? you override this anyways and never use this value
Your error is here:
restSeconds = CountSeconds = guiTime;
restSeconds and CountSeconds are both of type integer, while guiTime is of type float. Since float hold MORE information than integer, compiler wont allow implicit conversion, since that would mean you would lose information and that would lead to more programming errors. You can do:
- change those two varaibles to float
- cast float to int with `(int)guiTime` This will change value to integer, it will be truncated though.
[1]: http://mandismash.wordpress.com/2011/08/15/programming-error-cannot-implicitly-convert-type-float-to-int/
↧