t0r3 Posted April 4, 2019 Posted April 4, 2019 Hey If I want to display how many fish I've caught per hour, how do I go about that? When displaying how long the script has been running I format the long type to a String. I tried formatting the long type (how long the script has been running for) to an Integer, - returning an integer. This so that I can divide the fishCount int variable with another int variable.. But it doesn't seem to work I do realize I might have to learn some more java for this though hahah.. Any help appreciated
FuryShark Posted April 4, 2019 Posted April 4, 2019 timeBegan = System.currentTimeMillis(); gpPerHour = (int)(gpGained / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); From:
t0r3 Posted April 4, 2019 Author Posted April 4, 2019 1 hour ago, FuryShark said: timeBegan = System.currentTimeMillis(); gpPerHour = (int)(gpGained / ((System.currentTimeMillis() - timeBegan) / 3600000.0D)); From: Thnks! What does the .0D mean?
FuryShark Posted April 4, 2019 Posted April 4, 2019 27 minutes ago, t0r3 said: hnks! What does the .0D mean? D for Double