Don't like the invalid frame errors???
How would you like to have new logs created every day???
Do you use DeBugMode a lot???
You want a regular log and a different one for DeBugMode???
Ok... look for this in your brain (hal5.uhp) Hopefully you made a backup of your brain before you mess with it...
Ok, look for this in your brain, it's almost at the end of the script...
'POST PROCESS: SAVE HAL'S RESPONSE
PrevSent = GetResponse
'POST PROCESS: PRESERVE ALL VARIABLES
'Remember all the variables through encoding them into one function string using
'the DLL, since for some reason ByRef assignments don't work when a Visual Basic
'executable is calling a function in a VBScript program.
PrevUserSent = UserSentence
GetResponse = HalBrain.FixCaps(HalBrain.HalFormat(GetResponse))
If DebugMode = True Then
GetResponse = "Hal's Response: " & GetResponse & vbCrLf & DebugInfo
End If
That's what it looks like before you mess with it... now change it to look like this...
'POST PROCESS: SAVE HAL'S RESPONSE
PrevSent = GetResponse
yyear = Right(date,4)
ddate = Left(date,Len(date)-5)
mmonth = Left(ddate,2)
If InStr(mmonth, "/") >1 then
mmonth = left(ddate,1)
mmonth = "0" & mmonth
ddate = right(ddate,Len(ddate)-2)
Else
ddate = right(ddate,Len(ddate)-3)
End If
dday = ddate
If Len(dday) < 2 then dday = "0" & dday
ddate = yyear & mmonth & dday
AnswerSent = UserName & " said: " & Trim(OriginalSentence)
AnswerSent = HalBrain.FixCaps(HalBrain.HalFormat(AnswerSent))
QuestionSent = Time & " I said: " & Trim(GetResponse)
QuestionSent = HalBrain.FixCaps(HalBrain.HalFormat(QuestionSent))
HalBrain.AppendFile WorkingDir & "!Log" & ddate & ".txt", AnswerSent & vbCrLf & QuestionSent & vbCrLf
If DebugMode = True Then
HalBrain.AppendFile WorkingDir & "!DeBugLog" & ddate & ".txt", AnswerSent & vbCrLf & QuestionSent & vbCrLf
DebugInfo = DebugInfo & "Last LearningLevel: " & LearningLevel & vbCrLf
DebugInfo = DebugInfo & "Last LearningLevelA: " & LearningLevelA & vbCrLf
HalBrain.AppendFile WorkingDir & "!DeBugLog" & ddate & ".txt", DebugInfo & vbCrLf
End If
'POST PROCESS: PRESERVE ALL VARIABLES
'Remember all the variables through encoding them into one function string using
'the DLL, since for some reason ByRef assignments don't work when a Visual Basic
'executable is calling a function in a VBScript program.
PrevUserSent = UserSentence
GetResponse = HalBrain.FixCaps(HalBrain.HalFormat(GetResponse))
If DebugMode = True Then
'GetResponse = "Hal's Response: " & GetResponse & vbCrLf & DebugInfo
End If
The last line - if debugmode etc then 'getresponse ="Hal's response:
Notice how it is here that they add the debuginfo to the getresponse??? Well, I kinda wanted to keep my jokes working in debugmode, but with the debuginfo in there like that, the jokes couldn't be debugged... now they can...
Good luck guys!