GamyDay is NOT a short ?!

Post » Mon May 02, 2011 5:13 am

I just spent 7 hours finding this out.
I change the info on this in the Wiki, but now I have to check all my scripts that used this, ALL OF THEM! ALL MY MODS! :banghead:

I was getting message B when I should have got message A after a one time only flash of message B.

I discovered that SCAGameDay was 27 BUT GameDay was returning 27.27
So I change the short to a float and now the script works as it should.

But 27.27 seems...to much of a coincidence, like I am still missing something or my conclusion is wrong in some way.


;was short SCAGameDay;now it isFloat SCAGameDay if SCAGameday == Gamedayset MessagePTS to ( gamehour -  SCAClock )message"A points %.2f"MessagePTSset SCAPoints to ( SCApoints +  ( gamehour -  SCAClock ) )set SCAClock to gamehourelseset MessagePTS to ( gamehour + ( 23 - SCAClock ) )message"B points %.2f  SCAGameday %.2f gameday %.2f"MessagePTS SCAGameDay gamedayset SCAPoints to ( SCApoints + ( gamehour + ( 23 - SCAClock ) ) )set SCAClock to gamehour set SCAGameDay to GameDay endif

User avatar
Louise Dennis
 
Posts: 3489
Joined: Fri Mar 02, 2007 9:23 pm

Post » Sun May 01, 2011 11:18 pm

Same with Timers. They should all be floats if you want to use real time, with functions like GetSecondsPassed.

They can be used as shorts however if you want to use it as a countdown that runs every frame (i.e. each execution of the script).
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Sun May 01, 2011 11:04 pm

I am not talking about timers or getsecondspassed functions, only a direct "simple" compare of two "shorts"

if SCAGAMEDAY == GAMEDAY

But either way this was not in the Wiki as such.

Why the :swear: was it listed as a short ?




Same with Timers. They should all be floats if you want to use real time, with functions like GetSecondsPassed.

They can be used as shorts however if you want to use it as a countdown that runs every frame (i.e. each execution of the script).

User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Post » Mon May 02, 2011 4:00 am

After doing a search of the word GAMEDAY I found some people with the same problem in their scripts but no "answers" to their issue.
And either they never got their script to work or they did and then did not repost this short float "thing" after they discovered what the issue was.

"why wont my script work right" type questions with the GAMEDAY set to a short.

<_<
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Mon May 02, 2011 5:17 am

Why the :swear: was it listed as a short ?

Most likely because the CS itself lists it as a short. Jorne made a note about the issue http://cs.elderscrolls.com/constwiki/index.php/Talk:Special_variables#Errors_on_page. That was last year, it should have been updated then. Thanks for doing this now. :)
User avatar
Alberto Aguilera
 
Posts: 3472
Joined: Wed Aug 29, 2007 12:42 am

Post » Mon May 02, 2011 2:21 am

But I do not see that GAMEDAY is talked about, just the GAMEHOUR.

Anyway it will not be an issue now.

Most likely because the CS itself lists it as a short. Jorne made a note about the issue http://cs.elderscrolls.com/constwiki/index.php/Talk:Special_variables#Errors_on_page. That was last year, it should have been updated then. Thanks for doing this now. :)

User avatar
Jennifer Munroe
 
Posts: 3411
Joined: Sun Aug 26, 2007 12:57 am


Return to IV - Oblivion