Jump to content
Sign in to follow this  
Guest

xml string and p-variable problem.

Recommended Posts

Guest

HiI've must have tried a dozen ways to get the following string to work, but no success:%('Yes' 'No' (P:LOCAL TIME, seconds) 10 < ?)%!s!This is of course only a teststring, something else will take place whenever I get it to work.And it sounded so simple :( All I wanted in this was to display Yes if seconds is less than 10, No if above. What am I doing wrong? When I display the time, it seems to work ok, but the check never hits.

Share this post


Link to post
Share on other sites

Karl, Making a timer ? It's too bad TICK18 is not avaiable. P:Local time, seconds works but.... It's cumulitive seconds throughout the day. 00:00:01 = 1 and 23:59:59 = 5183999. To make something like this work you must initialize the timer...Initialize by either on an event or via click ---On event/click if{ (P:Local time, seconds) 10 + (>G:Var1) }(G:Var1) now has the 10 second timer of the event.You must be able to end the timer or cancel ----if event becomes false or cancellled if{ 0 (>G:Var1) } - or - timer runs out...(G:Var1) (P:Local time, seconds) < if{ ( Cancel resulting event ) + 0 (>G:Var1) } els{ resuting event }The whole problem with this is nearing 23:59:49 if greater than or == , then timer will fail.. I have some ideas but not fully looked into, I bet Arne could help here :-)1. you must then take the max time ( 518399 ) subtract current then add to zero. ( problem will be a 10 second delay before resulting event )Maybe something to look into ??Hope it helps,Roman(KGRB)


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest

Heh, I've done timers before with a preset time and toggles, and used to check with var+10secs or something and it works. Never though it had to do with cumulative seconds. Thanks for putting me on the right track.No, not a timer as such, I'm only trying to limit some calculations to every 1 second every fifteen minutes (no need for continuous maths going on in the background).I'll see if a seconds with modulo control does the trick.Thanks again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...