Alundaio Posted June 2, 2009 Share Posted June 2, 2009 I'm having trouble with GetTimeofDeath. It isn't returning the correct value. ---------------------------EXAMPLE-------------------------------------------------Float daysBeenDeadFloat hourBeenDeadFloat minBeenDead ;GetTimeDead is 48.5 in comment example set daysBeenDead to mytarget.GetTimeDead/24 ;Now this should return 2.021set hourBeenDead to daysBeenDead - Floor daysBeenDead ; This should return 0.021set hourBeenDead to hourBeenDead * 24 ; This should set hourBeenDead to 0.50set minBeenDead to hourBeenDead - Floor hourBeenDead ; This should set it to 0.50set minBeenDead to minBeenDead * 60 ;this should set it to 30.00 ShowMessage ExampleMessage,daysBeenDead,hourBeenDead,minBeenDead --------------------------------------------------------------------------------------------------The message should say "They have been dead for 2 days, 0 hours and 30 minutes" But minutes is always 0. Also, GetCauseofDeath always returns -1. What am I doing wrong? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.