GetCurrentTime in a quest script?

Post » Fri May 27, 2011 7:07 am

I have used GetCurrentTime in object scripts before without any problems.

I am now using the function in a quest script with no luck. Is there something different I need to do to use GetCurrentTime in a quest?

This is the code:

float fCTimeBegin Gamemodeset fCTime to GetCurrentTime  if fCTime <= 6.0 && >= 20.0	startquest MyQuest1  endifend

User avatar
Kelly Tomlinson
 
Posts: 3503
Joined: Sat Jul 08, 2006 11:57 pm

Post » Fri May 27, 2011 7:15 am

Less than or equal to 6 AND Greater than or equal to 20?
User avatar
Bereket Fekadu
 
Posts: 3421
Joined: Thu Jul 12, 2007 10:41 pm

Post » Fri May 27, 2011 8:00 am

Less than or equal to 6 AND Greater than or equal to 20?

Well the time is 24 hours system right?

So below 6 and above 20 means the time is before 6am and after 8pm.

That would work right?
User avatar
..xX Vin Xx..
 
Posts: 3531
Joined: Sun Jun 18, 2006 6:33 pm

Post » Fri May 27, 2011 10:56 am

Well the time is 24 hours system right?

So below 6 and above 20 means the time is before 6am and after 8pm.

That would work right?

No, you need OR.

if fCTime <= 6.0 || fCTime >= 20.0



Edit: Proper format for if statement.
Thanks TTT, missed that...

User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am

Post » Fri May 27, 2011 9:17 am

Well the time is 24 hours system right?
The number representing time goes from 0-24 in cycles, yes. That doesn't magically make 5 greater than 20. Just because the numbers represent a cycle doesn't mean The Intelligent Overmind Of Maths knows that- whatever you think, 5 is less than 20.
User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Fri May 27, 2011 5:37 pm

Ok thanks guys, I got it working now.
User avatar
Crystal Clear
 
Posts: 3552
Joined: Wed Aug 09, 2006 4:42 am


Return to IV - Oblivion