Announcement

Collapse
No announcement yet.

init error: Invalid character

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

  • init error: Invalid character

    Trying to set a scene with the script and getting the following error message.

    Apr-29 8:24:06 AM Error Running script(2) &hs.PluginFunction("BLAB8SS", "", "SetScene", {"Master Suite"}), init error: Invalid character

    Apr-29 8:24:06 AM System Control Panel Immediate Script: &hs.PluginFunction("BLAB8SS", "", "SetScene", {"Master Suite"})

    I've attached the debug log but don't see any issues in it, but then again, I'm no programmer. Any help would be appreciated.
    Attached Files
    Last edited by itanic; April 29th, 2015, 10:55 AM.
    Regards, Bob

  • #2
    Try this:

    Code:
    &nhs.PluginFunction("BLAB8SS", "", "SetScene", new Object(){"Master Suite"})
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


    • #3
      Apr-29 10:21:56 AM Error Running script(2) &hs.PluginFunction("BLAB8SS", "", "SetScene", new Object(){"Master Suite"}), init error: Expected end of statement

      Apr-29 10:21:56 AM System Control Panel Immediate Script: &hs.PluginFunction("BLAB8SS", "", "SetScene", new Object(){"Master Suite"})
      Regards, Bob

      Comment


      • #4
        You need to start the line with &nhs.
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment


        • #5
          OK that seems to work, but don't understand the &nhs. command vs &hs. command Why is it necessary?
          Regards, Bob

          Comment


          • #6
            It is a vb.net issue that happened in HS2 so Rich added &nhs in order to get it to work in HS3.
            Perhaps he can explain it better
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


            • #7
              Well OK then. Thanks for the assist. Would that apply to all the scripting commands for the BLAB8SS plugin?
              Regards, Bob

              Comment


              • #8
                Ugh!

                Just tried it in a new script and got the following.

                Apr-29 3:27:36 PM Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\test.vb: 'nhs' is not declared. It may be inaccessible due to its protection level.
                Regards, Bob

                Comment


                • #9
                  In a script you do not need it but to run a script command from the control panel or an event you will need it
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                  • #10
                    Got it. Thanks again.
                    Regards, Bob

                    Comment

                    Working...
                    X