hy, again!
I've got 2 Time stamps made with Time.now.to_i and saved into $game_variables[5] and $game_variables[6].
So how can i calculate the difference in days between 5 and 6?
how can i round from 0.1 to 1?
I tried to solve it that way but it returns me a syntax error
CODE
class ZeitFunktionen
def calculate_days(timestamp_start, timestamp_end)
difference = timestamp_end - timestamp_start
minutes = difference/60
hours = minutes/60
days = hours/24
return days
end
end
That's how I call the Script
CODE
var = ZeitFunktionen.new
$game_variables[45] = var.calculate_days
($game_variables[44], Time.now.to_i)
thx, Kurti
since i didn't receive any answer for days, i had to search for answers elsewhere. and i found answers. i had to use 60.0 to make it a float.
if anyone's interested in this script, simply ask.
This post has been edited by KurtiAustria: Aug 8 2008, 12:29 AM