Hi all,
I'm trying to come up with a simple calcutation tool for an on-line game called travian...
I'm trying to automatiza the calculation of the time nned to travel from point a to b at a given speed...
For the ones not fammyliarized with the game,,, The units have diferents seepds, measured in squares per hour...
So, since I don't want to repeat the same code over and over, I thought about creating a calculation sub and pass the parameters...
But they are not being passed...
I just can't fugure out...
Any thoughts?
I'm also trying to convert seconds to the time format (HH:MM:SS), any one have done that yet?
I'm trying to come up with a simple calcutation tool for an on-line game called travian...
I'm trying to automatiza the calculation of the time nned to travel from point a to b at a given speed...
For the ones not fammyliarized with the game,,, The units have diferents seepds, measured in squares per hour...
So, since I don't want to repeat the same code over and over, I thought about creating a calculation sub and pass the parameters...
But they are not being passed...
I just can't fugure out...
B4X:
.....
n=VLeg
Calculos(d,ds,fx,n)
Msgbox(TS)
End Sub
Sub Calculos
v=3600/n
Msgbox(v)
TS=(v*d)+((v*fx)*ds)
Format(TS,"n2")
Return(TS)
End Sub
Any thoughts?
I'm also trying to convert seconds to the time format (HH:MM:SS), any one have done that yet?