Announcement

Collapse
No announcement yet.

weird error

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

  • weird error

    Can anyone explain what this error is?

    Running script Cookie.vb :Exception has been thrown by the target of an invocation.->Does entry point Main exist in script? at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Obj ect obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Scheduler.clsRunVBNetScript.ExecuteScript()

  • #2
    It seems like lots of different problems with a script can cause that error or one very similar to it. It offers no real clue as to what the actual problem with the script is, other than that the script in question is Cookie.vb

    Comment


    • #3
      I’ve seen that error a few times over the years and typically something that is related to that message is wrong. If you haven’t figured it out yet, post your script and the details on how you are calling the script.
      HS 3.0.0.548: 1990 Devices 1172 Events
      Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

      Comment


      • #4
        This is going to look similar to the last problem I had Sparkman. I am trying to send an object from hstouch this time via a text box so the user can input a string i can then work with in HS3. Its launched through a click in HStouch which should run script with the parameters being sent across. I am only attempting to send a single parameter and it should be a string. My script itself is very basic since i boiled it down to basically nothing trying to isolate the problem.

        Sub Main(ByVal parm As Object)

        Dim cinput
        cinput = parm(0).ToString

        hs.writelog("The entry is " & cinput)

        End Sub

        Originally posted by sparkman View Post
        I’ve seen that error a few times over the years and typically something that is related to that message is wrong. If you haven’t figured it out yet, post your script and the details on how you are calling the script.

        Comment


        • #5
          Only thing that jumps out at me is that you are not explicitly declaring cinput as a string. Does changing it to:

          Code:
          Dim cinput As String
          make any difference?

          If not, perhaps:

          Code:
          Dim cinput As String = parm.ToString
          HS 3.0.0.548: 1990 Devices 1172 Events
          Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

          Comment


          • #6
            If the script is being run from an HS event, then the parm is expected to be a single string, not an array.

            If the script is being run from HsTouch, then the parm is expected to be a string array containing one or more strings.

            I'm pretty sure this is correct, even though it does not make much sense.

            tenholde
            tenholde

            Comment


            • #7
              Originally posted by tenholde View Post
              If the script is being run from HsTouch, then the parm is expected to be a string array containing one or more strings.
              String array or Object array?
              HS 3.0.0.548: 1990 Devices 1172 Events
              Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

              Comment


              • #8
                Originally posted by sparkman View Post

                String array or Object array?
                My experience with HStouch is the same, a string array.

                Comment

                Working...
                X