Announcement

Collapse
No announcement yet.

tenscripting error newbie following video

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

    tenscripting error newbie following video

    this is what i have

    Public Class Newscriptname
    Public Sub Main(ByVal Parms As Object)
    Dim ParmArray(10) As String
    '' Extract script parameters into ParmArray()
    ParmArray(0) = ""
    If Parms.ToString.Contains("|") Then
    ParmArray = Parms.ToString.Split(Convert.ToChar("|"))
    Else
    ParmArray(0) = Parms.ToString
    End If

    hs.WriteLog("turning On the light", "scriptrunning")
    If hs.DeviceValueEx(hs.GetDeviceRefByName("EnvisaLink Shock Sensor Z6")) = 1 Then
    hs.CAPIControlHandler(hs.CAPIGetSingleControl(hs.GetDeviceRe fByName("Lights office Office Light"), True, "On", False, False))

    End If
    End Sub
    End Class

    and I get an error message

    BC30188 Declaration expected

    Microsoft Visual Studio Community 2019
    Version 16.6.3

    Thanks
    Paul.

    #2
    OK, I am absolutely the LAST person qualified to give you help on programming, but this link may lead you to a point of self-help

    https://docs.microsoft.com/en-us/dot...ation-expected
    HomeSeer Version: HS3 Pro Edition 3.0.0.500
    Operating System: Microsoft Windows 10 Pro - Work Station

    Enabled Plug-Ins:
    2.1.0.119: AmbientWeather | 3.0.21.0: BLLock | 2.0.24.0: BLUPS | 1.3.6.0: Device History | 3.0.0.56: EasyTrigger | 3.1.0.7: MeiHarmonyHub | 3.0.6681.34300: UltraCID3 | 3.0.6644.26753: UltraLog3 | 3.0.6554.33094: UltraMon3 | 3.0.0.91: weatherXML | 3.0.1.245: Z-Wave | 3.0.51: HS Touch Designer | 3.0.0.40 Z-Seer+

    Comment


      #3
      Originally posted by sirbooker View Post
      this is what i have


      hs.CAPIControlHandler(hs.CAPIGetSingleControl(hs.GetDeviceRe fByName("Lights office Office Light"), True, "On", False, False))

      There is a space in the middle of the GetDeviceRefByName. This may be just from your creating the post.

      I copied exactly what you posted into a tenScripting .vb script file, eliminated the space, and I get no compile errors. I ran tenScripting and selected your code to run, and it ran ok. Writelog was executed, although the rest of the logic wouldn't work for me as I don't have that device in my HS system.

      Where were you seeing the BC30188 error. Before you ran the tenScripting project? While running it? Or, in the log when running it from an HS Event?
      tenholde

      Comment


        #4
        Please review this video: http://tenholder.net/tenScriptingError.mp4

        tenholde

        Comment


          #5
          Thank You very much tenhole ,the little video explaining it was great.
          i hope you do more videos in the future
          >>Where were you seeing the BC30188 error. when i clicked on start it would try an compile and then stop.
          below on the screen i would see the error.
          i am going to watch the video again and repeat my steps to see what happen
          have not coded a day in my life until now
          Paul.

          Comment

          Working...
          X