Day of Year not working

nickw

Administrator
Staff member
Arno,

I have tried everything... there is something wrong with the day of year variable. I cannot for the life of me get it to condition the month of December.

Try it there, I am certain it does not work.

To test I tried,
334 to 365
330 - 360
1 - 31
1 - 1 (This worked)
 

nickw

Administrator
Staff member
OK, well as that didn't work, I found out a LOT about BGL Source code this evening... I did not think I would crack it but I have!

I used the following code in the ASM and this works perfectly for December. (The days do not make sense, but it works) I put this just before the DRAW_TRI section

Code:
;Hack by Nick - December Only   
    IFIN1 a00, 38ah, 336, 366
and then wrapped that off at the end.

Now it works :)

So, Arno I think this should be put in as a bug. The same problem occured for seasonal checks.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
This should be exactly the same code as MDLTweaker entered for you. So are you sure that you entered it correct in MDLTweaker? I will try do test it this evening.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Interesting, let me try it when I get home. Can you also send me your origional object, maybe it has something to do with the structure of that.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
OK, I have found it. The values you enter in MDL Tweaker are taken as hexadecimal values by default. This means if you enter 300, it will be seen as 300h. This would mean that you are checking for day 700 something, which makes no sense of course.

I will add a option in a future version that allows you to specify if you are entering the values as hexadecimal or as decimal. For frequencies hexadecimal is easier for example, while for this day of the year example the reverse is true.
 

nickw

Administrator
Staff member
Yes, thanks for spotting my mistake Arno.

You know I never read the manual.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
It could very well be that this is not written very clear in the manual, I see it more as a little bug :D.
 
Top