Announcement

Collapse
No announcement yet.

script error in file: nameofscript.txt: 0 :in line 0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    script error in file: nameofscript.txt: 0 :in line 0

    I am trying to write a simple script to send a extended code to my dimmers (the extended codes allow me to choose the ramp rate.)

    This is what I have done:

    sub main()
    hs.execX10 "A2","extended",148,49
    end sub

    When I test the script in the properties of the event it will be used in it works fine. But when I try to run the event normally I get an error

    script error in file: nameofscript.txt: 0 :in line 0

    #2
    timwarner,
    When you say "run the event normally" is this running a script that has the posted code? What is the trigger?
    -Rupp
    sigpic

    Comment


      #3
      Yes the problem is occurring when I try to run the event which is running the posted script.
      Trigger is timed but also I have tried execute now.

      Comment


        #4
        timwarner,
        I just tried the script here and had it triggered by time and it worked perfectly. I would suggest deleting the script and retyping it in. There must be a control character in the script or something.
        -Rupp
        sigpic

        Comment


          #5
          I have tried that but still no luck.

          I have then tried restarting homeseer and in the log I noticed that the startup.txt is getting the same error.

          Do I need to reinstall homeseer.

          Comment


            #6
            Hum ... This error used to be caused by the () missing in sub main() like sub main. I would try the repair option in HS and see if that helps. If not a repair on IE might fix it. It seems like the scripting engine may be confused.
            -Rupp
            sigpic

            Comment


              #7
              Did you use emacs to write the script?

              I found that if you have a problem with LF/CR that you can get this error message. Emacs will handle whatever linefeeds you have but if viewed in notepad the script was all one line.

              May not be your problem, but this caught me out recently.

              Dan.
              HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
              BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
              DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

              Comment


                #8
                Rupp
                where is the repair option in Homeseer? I couldn't find it.

                Dan
                No the script was written in notepad. Thanks for the advice I will bear that in mind for the future.

                UPDATE
                I have not changed anything but now sometimes the script will run. (more times than not). I will see how it goes. Thanks again

                Comment


                  #9
                  timwarner,
                  The repair option is available when you choose add/remove on HS from the Start > Control Panel > Add Remove programs.
                  -Rupp
                  sigpic

                  Comment

                  Working...
                  X