Flight Time , Seconds to Minutes
#6

my bad, i forgot that my function first set ms, ss, mm, then hh and dd (so the final value of minutes in the example would be in fact, the days..)

You have to create a dummy variable.
pawn Код:
new useless, minutes, seconds;
TimeConvert(FLTime_LosSantos, useless, useless, minutes, seconds, .method = tc_seconds);


Or, to avoid creating an extra unused variable (waste of memory), change the function header to:
pawn Код:
stock TimeConvert(time, &dd=0, &hh=0, &mm=0, &ss=0, &ms=0, tc_method:method=tc_milliseconds)
and then you can do like that:
pawn Код:
new minutes, seconds;
TimeConvert(FLTime_LosSantos, _, _, minutes, seconds, .method = tc_seconds);
Reply


Messages In This Thread
Flight Time , Seconds to Minutes - by Robbin237 - 19.02.2009, 14:59
Re: Flight Time , Seconds to Minutes - by Joe Staff - 19.02.2009, 15:07
Re: Flight Time , Seconds to Minutes - by Robbin237 - 19.02.2009, 15:10
Re: Flight Time , Seconds to Minutes - by yom - 19.02.2009, 16:14
Re: Flight Time , Seconds to Minutes - by Robbin237 - 20.02.2009, 09:14
Re: Flight Time , Seconds to Minutes - by yom - 20.02.2009, 15:23

Forum Jump:


Users browsing this thread: 1 Guest(s)