Code doesn't work.

Discussion in 'PangoScript, Universe and Midi Templates' started by Artur, Feb 8, 2024.

  1. Artur

    Artur New Member

    It is necessary to turn on the laser daily, turn it on at 9:00 pm, turn off at 8:00 am.
    CodeName "Untitled"

    AutoStart
    EnableLaserOutput
    WaitForTime 21,0,0 // hours, minutes, seconds, ms
    StartCue 1,1
    WaitForTime 8,0,0,0 // hours, minutes, seconds, ms
    StopCue 1,1
    Restart


    The above code doesn't work and freezes. But if you write it like this, the example below, then everything works. What am I doing wrong?


    AutoStart
    EnableLaserOutput
    WaitForTime 8,0,0 // hours, minutes, seconds, ms
    StartCue 1,1
    WaitForTime 21,0,0,0 // hours, minutes, seconds, ms
    StopCue 1,1
    Restart
     
  2. Artur

    Artur New Member

    I noticed that if you don’t set the time consistently, everything freezes. Help me write a code so that the laser turns on every evening and turns off in the morning.
     
  3. Bob@Pangolin

    Bob@Pangolin Staff Member