Announcement

Collapse
No announcement yet.

What's wrong with this VERY BASIC VB script?

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

    What's wrong with this VERY BASIC VB script?

    Sub or Function: MainSub
    Parameters: "My Test Script"

    Code:
    Public Sub MainSub(ByVal MyParam As String)
              hs.WriteLog("Test") 'log the code entry
    End Sub
    It throws an error!
    Code:
    Running script MyScript.vb :Object reference not set to an instance of an object.->Does entry point MainSub() exist in script? at Scheduler.clsRunVBNetScript.ExecuteScript()
    At the end, I would like the WriteLog to output my Parameter, but I can't even get this basic script to work!

    #2
    hs.WriteLog() wants two parameters: first one will appear in the 'Type' column, the second in the 'Message' column.

    So try
    Code:
    hs.WriteLog("MyScript", "This is the message that I want to log")

    Comment


      #3
      Originally posted by zwolfpack View Post
      hs.WriteLog() wants two parameters: first one will appear in the 'Type' column, the second in the 'Message' column.

      So try
      Code:
      hs.WriteLog("MyScript", "This is the message that I want to log")
      Thank you!!!

      Comment

      Working...
      X