OK, new Hal install, only the basic default brain and plug-ins running and I've had the following error happen twice:
HalScript Error 13 on line 621 in column 30: Type mismatch: 'CVar'
Here's the script:
'Date Pattern: in # days/weeks/months
OrigPrefix = HalBrain.SearchPattern(ApptSentence, "* in * days*", 1)
DateText = HalBrain.SearchPattern(ApptSentence, "* in * days*", 2)
OrigSuffix = HalBrain.SearchPattern(ApptSentence, "* in * days*", 3)
If DateText = "" Then
OrigPrefix = HalBrain.SearchPattern(ApptSentence, "* in * weeks*", 1)
DateText = HalBrain.SearchPattern(ApptSentence, "* in * weeks*", 2)
OrigSuffix = HalBrain.SearchPattern(ApptSentence, "* in * weeks*", 3)
End If
If DateText = "" Then
OrigPrefix = HalBrain.SearchPattern(ApptSentence, "* in * months*", 1)
DateText = HalBrain.SearchPattern(ApptSentence, "* in * months*", 2)
OrigSuffix = HalBrain.SearchPattern(ApptSentence, "* in * months*", 3)
End If
If DateText <> "" Then
PhraseVal = HalBrain.MakeInt(DateText)
621 - If PhraseVal = 0 Then PhraseVal = HalBrain.Word2Num(CVar(DateText))
If PhraseVal > 0 Then
If InStr(1, ApptSentence, " days", vbTextCompare) Then
MentionedDate = DateAdd("d", PhraseVal, Date)
ElseIf InStr(1, ApptSentence, " weeks", vbTextCompare) Then
MentionedDate = DateAdd("ww", PhraseVal, Date)
ElseIf InStr(1, ApptSentence, " months", vbTextCompare) Then
MentionedDate = DateAdd("m", PhraseVal, Date)
End If
End If
End If
I tracked it down to the appointments plug-in.
My input each time the error occured was something like: "In the last two months...."
Immediately after the error, I got the silent treatment twice, but then Hal responded to a later input.
Anyone else have this happen?
Is this a vbscript bug caused by Windows 7/8?