Eliot Posted June 1, 2014 Posted June 1, 2014 He can hold planksPerHour as integer, there's no need for long, as it won't even exceed 2k. Also, he doesn't need to reverse order, if he changed the number to double. (3600000.0) or (3600000d). The resulting double will be converted back to integer without any problems. int planksPerHour = (int)(3600000d * planksCreated / System.currentTimeMillis() - startTime); Well, if you want to be more efficient: short planksPerHour = (short)(3600000d * planksCreated / System.currentTimeMillis() - startTime);
Nitrousek Posted June 1, 2014 Posted June 1, 2014 (edited) Well, if you want to be more efficient: short planksPerHour = (short)(3600000d * planksCreated / System.currentTimeMillis() - startTime); veryshort planksPerHour = (veryshort)(3600000d * planksCreated / System.currentTimeMillis() - startTime); Your short actually wouldn't work if he started the script and crafted items instantly // for many scripts Edited June 1, 2014 by Nitrousek 1