12
« on: April 12, 2008, 06:44:47 am »
In my attempt to build a brain plug-in, I've run into a few odd things...
1. The plug-in seems to get 3 passes for each user sentence input. If I put the following in the plug-in...
HalCommands = "<SPEAK>" & "test 1 2 3" & "</SPEAK>"
Reload the brain so the plug-in is refreshed, then type something to hal and press enter,I see "test 1 2 3" printed out 2 times in hal's response window and spoken back to me 3 times. What's up with that?
2. When using the UserSentence in my code, I found that it's padded on both ends with 2 spaces, so if you entered "this is a test", the UserSentence string would be " this is a test ". What's up with that?
3. I've noticed that if you have more than one "HalCommands =" statements in the plug-in, only the LAST one executes. What's up with that?
I was putting together some simple code that should have taken an hour tops, but because of these three unexpected oddities, It took me hours to figure out why the code wasn't working.
How many more unexpected oddities can I expect to encounter?
I'm beginning to believe that Ultra Hal is fine for a chatterbox, but not really what I want for my needs and that maybe I should just write my own program that takes advantage of Haptek.
What do some of you other users think?
Is there a document that tells you all these "oddities" and WHY they need to be that way?
Is anyone else running into these type of problems with programming with hal?
I need to figure out the plan or move on.