Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: HALImprover on June 17, 2003, 03:12:54 am

Title: Stop repeating yourself, HAL
Post by: HALImprover on June 17, 2003, 03:12:54 am
I'm trying to stop HAL from saving repeating subject words in his random_subject.brn file by editing the default HAL brain in Brain Editor. I am getting Error 1025 expected end of statement. Here is my code:

fileNumFix = FreeFile
newSubjectFix = True
Open (WorkingDir & "random_subject.brn") For Input As fileNumFix
   Do Until EOF(1) OR newSubjectFix = False
      Line Input fileNumFix, newSubjectTextFix
      If newSubjectTextFix = " " & SubPhrase & " " Then
         newSubjectFix = False
      End If
   Loop
   Close fileNumFix

The above code compares each line in the text file with the new subject phrase that HAL decides to save. If the phrase is found a variable (newSubjectFix) is set that prevents HAL from saving the phrase (making a redundant repeat in his random_subject.brn file).

Can anyone please help me with this?
Title: Stop repeating yourself, HAL
Post by: Morkeleb on June 29, 2003, 11:17:18 pm
If you find and answer please let me know I ahve had bad problems with loops and duplications. Eack time a turn on learning while online it happens and then corupts the brain files with endless loops.[B)]