Zabaware Support Forums

Stop repeating yourself, HAL

Started by HALImprover, June 17, 2003, 03:12:54 AM

Previous topic - Next topic

HALImprover

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?
Living life with a loving heart, peaceful mind, and bold spirit.

Morkeleb

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)]
Ask and you shall learn
Be not afraid to try new things.
----------------------
Check out www.cold-chaos.net