dupa

Author Topic: Stop repeating yourself, HAL  (Read 3744 times)

HALImprover

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • BrianTaylor.me
Stop repeating yourself, HAL
« 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?
Living life with a loving heart, peaceful mind, and bold spirit.

Morkeleb

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Stop repeating yourself, HAL
« Reply #1 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)]
Ask and you shall learn
Be not afraid to try new things.
----------------------
Check out www.cold-chaos.net