Announcement

Collapse
No announcement yet.

Compile error

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

  • Compile error


  • #2
    Here is some code This runs in Tenscripting but produces a compile error in Homeseer.

    It runs in both if I comment out this line .....TempList = {20, 23, 24, 21, 21, 23}


    Public Sub Main(ByVal Parms As Object)

    Dim HouseTime As Integer = hs.DeviceValue(302) '0= Night, 25=Morning, 50=Day, 75=Evening
    Dim TempList() 'YripTemp, BedroomTarget, DrawingTarget, CinemaTarget, GamesTarget,StudyTarget

    Select Case HouseTime
    Case 25 'morning
    TempList = {20, 23, 24, 21, 21, 23}
    hs.WriteLog("Success", "Morning")

    Case Else
    hs.WriteLog("Success", "Day")

    End Select


    End Sub

    Comment


    • #3
      Just ran your script under HS3 with no problems.

      Of course, I'm running HS3 under windows. Looks like you are Linux, correct?

      If so, I'd say this is an incompatibility with Mono?

      tenholde
      tenholde

      Comment


      • #4
        Thanks Ed

        Yes I think it is an incompatibility issue. I am running mono 3.28 (or something like that). Select...Case worked in the end but Arrays are still problematical. Using trial and error I used different commands / code to achieve what I needed to. I may try and upgrade to mono 4.

        Ian

        Comment


        • #5
          Try this:

          TempList = New Object() {20, 23, 24, 21, 21, 23}
          stefxx

          Comment


          • #6
            Originally posted by stefxx View Post
            Try this:

            TempList = New Object() {20, 23, 24, 21, 21, 23}
            Thank you.

            I did sort out a workaround, similar to that.

            So overall it is a mono issue (i.e. code that will work in Windows but not Linux) or it could be a Mono version issue as I upgraded to Mono 4 but then all of my working scripts refused to compile at all. So back to 3.28.

            Comment

            Working...
            X