Announcement

Collapse
No announcement yet.

How to find the "real" error line when HS logs an error

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

    How to find the "real" error line when HS logs an error

    I'm trying to convert an HS3 script back to run in HS2. When the script is run, I get this error:

    Script compile error: Expression expected.on line 221

    If I open the script in Visual Studio 2010 Express, line 221 is a blank line! How can I determine the actual line that's causing the error?

    Thanks!
    Fred

    HomeSeer Pro 3.0.0.548, HS3Touch, Zwave 3.0.1.252, Envisalink DSC 3.0.0.40, WeatherXML, Z-stick, HS phone, Way2Call

    #2
    If memory serves me correctly HS adds 13 lines to the file.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Originally posted by Rupp View Post
      If memory serves me correctly HS adds 13 lines to the file.
      My recollection is the same.

      I find tenScripting to be helpful when debugging HS scripts.
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        Thanks to both of you! I'll try both methods.
        Fred

        HomeSeer Pro 3.0.0.548, HS3Touch, Zwave 3.0.1.252, Envisalink DSC 3.0.0.40, WeatherXML, Z-stick, HS phone, Way2Call

        Comment


          #5
          One way to determine this is to create a syntax on the first statement of your script and see which line number is indicated and adjust from there
          tenholde

          Comment


            #6
            Originally posted by tenholde View Post
            One way to determine this is to create a syntax on the first statement of your script and see which line number is indicated and adjust from there
            Brilliant! Will try that tomorrow. Thanks!
            Fred

            HomeSeer Pro 3.0.0.548, HS3Touch, Zwave 3.0.1.252, Envisalink DSC 3.0.0.40, WeatherXML, Z-stick, HS phone, Way2Call

            Comment


              #7
              Thanks to all of you! The 13-line offset is still correct. Just for the benefit of others seeing this in the future, the actual line number is 13 less than that shown in the error message.
              Fred

              HomeSeer Pro 3.0.0.548, HS3Touch, Zwave 3.0.1.252, Envisalink DSC 3.0.0.40, WeatherXML, Z-stick, HS phone, Way2Call

              Comment


                #8
                Originally posted by Uncle Michael View Post
                My recollection is the same.

                I find tenScripting to be helpful when debugging HS scripts.
                Unfortunately there is a slight disconnect between tenScripting, which is wonderful, and HS. Things will run perfectly from tenScript but then fail in HS for a variety of reasons.

                Still far better that using WriteLog calls.

                Comment


                  #9
                  Personally, I wish HS provided an option to save the "augmented" source. It would be nice to see what HS adds.

                  Comment


                    #10
                    Originally posted by mkropp View Post

                    Unfortunately there is a slight disconnect between tenScripting, which is wonderful, and HS. Things will run perfectly from tenScript but then fail in HS for a variety of reasons.

                    Still far better that using WriteLog calls.
                    I would like to keep an ongoing document of any differences between tenScripting and HS script compilation and execution, as an aide to all. Could you and others provide examples please.
                    tenholde
                    tenholde

                    Comment


                      #11
                      Also, as a reminder, tenScripting now supports C# script development
                      tenholde

                      Comment

                      Working...
                      X