1
Programming using the Ultra Hal Brain Editor / Brain Issue - Changing skins
« on: May 01, 2006, 06:06:13 am »
I have tried using many variants on the whole "get input - change skin" If-then statement. Still can't get it to work. Basically, it's determining that the If-Then is false. Here's a sample of the code I'm using:
If InStr(UserSentence, "qz") > 0 Then
GetResponse = "I have changed into my slinky, sexy dress, <username>. How do I look?"
HalCommands = "<HAPFILE>" & "dress.hap" & "</HAPFILE>"
BlockSave=True
GetResponseBlock = True
End If
This is using the default brain. The .HAP file is pointing to the correct file. The location of the If-Then is just after the Initialize Variables section.
The most irritating issue is that this exact same statement worked not 3 hours ago. Then I decided to modify the If-Then to allow for multiple choices. That didn't work, so I deleted the choices, and went back to this.
If I modify the If-Then to = 0, then I get an error saying Illegal assignment "getresponse".
Anyone have any input on this?
If InStr(UserSentence, "qz") > 0 Then
GetResponse = "I have changed into my slinky, sexy dress, <username>. How do I look?"
HalCommands = "<HAPFILE>" & "dress.hap" & "</HAPFILE>"
BlockSave=True
GetResponseBlock = True
End If
This is using the default brain. The .HAP file is pointing to the correct file. The location of the If-Then is just after the Initialize Variables section.
The most irritating issue is that this exact same statement worked not 3 hours ago. Then I decided to modify the If-Then to allow for multiple choices. That didn't work, so I deleted the choices, and went back to this.
If I modify the If-Then to = 0, then I get an error saying Illegal assignment "getresponse".
Anyone have any input on this?