BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to get minute 10 digit and 1 digit from time variable at the .animated file

2 posters

Go down

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Empty How to get minute 10 digit and 1 digit from time variable at the .animated file

Post by Midnight Express Ginga81 Fri Sep 03, 2021 7:35 am

I calculated at LibreOffice Calc.
I can get correctly all digits of hour and minute.
How to get minute 10 digit  and 1 digit from time variable at  the .animated file Calc10
The hours 10 and 1 digits can get and display correctly.
But, When I translate to .animated function, minutes 10 and 1 digits are only zero display and error occurs.
Code:
[Object]
States= digital-none.csv,digital-1.csv,digital-2.csv
Position= -0.15864,0.19467,0
StateFunction = floor [ time / 36000 ]
 
[Object]
States= digital-0.csv,digital-1.csv,digital-2.csv,digital-3.csv,digital-4.csv,digital-5.csv,digital-6.csv,digital-7.csv,digital-8.csv,digital-9.csv
Position= -0.057572,0.19467,0
StateFunction = floor[mod[time/3600,10]]
 
[Object]
States= digital-0.csv,digital-1.csv,digital-2.csv,digital-3.csv,digital-4.csv,digital-5.csv,digital-6.csv,digital-7.csv,digital-8.csv,digital-9.csv
Position= 0.077009,0.19467,0
StateFunction = floor [ floor [ time- [ floor [ time/3600 ] *3600 ]] /60/10]
 
[Object]
States= digital-0.csv,digital-1.csv,digital-2.csv,digital-3.csv,digital-4.csv,digital-5.csv,digital-6.csv,digital-7.csv,digital-8.csv,digital-9.csv
Position= 0.17739,0.19467,0
StateFunction = mod[ floor[ floor[ time- [ floor[ time/3600 ]*3600 ]] /60 ] ,10]

The error message is 'The function  is not supported in [Times[floor[Divide[time,3600]],3600]]'.
How to calclate and how to get the minutes 10 digit  and 1 digit correctly?
Please teach me...help me!

Midnight Express Ginga81

Posts : 149
Join date : 2016-09-25

Back to top Go down

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Empty Re: How to get minute 10 digit and 1 digit from time variable at the .animated file

Post by Midnight Express Ginga81 Fri Sep 03, 2021 10:39 am

I think that if we can use the Variable of hour, minute, seconds such as Panel2.cfg, we can create the digital clock easily.
In this time, I faced by this case, I remembered that, Panel.animated cannot get and use Panel2.cfg's subjects...

Midnight Express Ginga81

Posts : 149
Join date : 2016-09-25

Back to top Go down

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Empty Re: How to get minute 10 digit and 1 digit from time variable at the .animated file

Post by Midnight Express Ginga81 Fri Sep 03, 2021 4:06 pm

Sorry for write topic.
I heard the another Japanese user.
Such as this, digital watch can be shown correctly!
So, this problem is ended.
Thank you very much!
How to get minute 10 digit  and 1 digit from time variable at  the .animated file Screen15

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Screen16

Midnight Express Ginga81

Posts : 149
Join date : 2016-09-25

Back to top Go down

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Empty Re: How to get minute 10 digit and 1 digit from time variable at the .animated file

Post by leezer3 Fri Sep 03, 2021 10:49 pm

That was a easy one Smile

I've added Hour Minute and Second as available animated variables.

Obviously, you can use the code you've already got (and this is better for backwards compatability anyway) but on the flip side they're logical, and will make the next person's job much easier.

leezer3

Posts : 1967
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Midnight Express Ginga81 and Rakago like this post

Back to top Go down

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Empty Re: How to get minute 10 digit and 1 digit from time variable at the .animated file

Post by Midnight Express Ginga81 Sat Sep 04, 2021 12:21 am

This time, I was taught by another Japanese user.
But, as you say, they can be easily created for future users.
Thank you for adding the functions!

Midnight Express Ginga81

Posts : 149
Join date : 2016-09-25

Back to top Go down

How to get minute 10 digit  and 1 digit from time variable at  the .animated file Empty Re: How to get minute 10 digit and 1 digit from time variable at the .animated file

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum