I am retrieving events from my google calendar via a BLGdata function. I am trying to have a condition in case there are no events. But I am getting errors, looks like it doesn't like the = ""
The code which generates the error must be
If allEvents = ""
This is the offending code (the part which generates the error)
These are the errors in the log:
Nov-06 16:03:24 Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\SendCalEvents.vb: Operator '=' is not defined for types '1-dimensional array of Object' and 'Integer'.
Nov-06 16:03:24 Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\SendCalEvents.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
The code which generates the error must be
If allEvents = ""
This is the offending code (the part which generates the error)
Code:
Const ScriptName As String = "SendCalEvents" Dim allEvents As Object() allEvents = hs.PluginFunction("BLGData", "", "GetCalendarEventsForXDays", new Object(){"[EMAIL="xxx@gmail.com","xxx@gmail.com",7"]xxx@gmail.com","xxx@gmail.com",7[/EMAIL]}) EmailBody = "Next calendar events " & VbCrLf & VbCrLf If allEvents = "" ' I also tried If allEvents = 0 EmailBody = "*** no events in this period ***" End If For Each ev As Object In allEvents
These are the errors in the log:
Nov-06 16:03:24 Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\SendCalEvents.vb: Operator '=' is not defined for types '1-dimensional array of Object' and 'Integer'.
Nov-06 16:03:24 Error Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\SendCalEvents.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Comment