EachIn troubles

BlitzMax Forums/BlitzMax Beginners Area/EachIn troubles

Ok Here is the faulty code

Type tFRSetting
	Field id:String
	Field value:String
End Type

Type tFRFile
	Field id:String
	Field fileName:String
	
	Field settings:TList
		
	' // Constructor //
	Method New()
		Self.settings = CreateList()
	End Method
	
	
	Function getSetting(name:String)
	End Function
	
	Function setSetting(name:String, newValue:Object)
	End Function
	
	Function loadRaw(sFileName:String)
		Local sLine:String
		Local sSettingName:String
		Local sSettingValue:String
	
		Local iEquals:Int
	
		Local strmFile:TStream = ReadFile(sFileName)

		If Not strmFile Then
			Print "ERROR: FileReader  - No Stream for file " + sFileName
			Return
		End If 
		
		While Not Eof(strmFile)
			sLine = ReadLine(strmFile)
			sLine = Trim(sLine)
			
			If Left(sLine,1) <> ";" Then
				iEquals = Instr(sLine, "=", 1)

				sSettingName = Left(sLine, iEquals -1)
				sSettingValue = Mid(sLine, iEquals +1)

				' // Get rid of any trailing semi-colons //
				If Right(sSettingValue, 1) = ";" Then
					sSettingValue = Left(sSettingValue, Len(sSettingValue) -1)
				End If
				
				' // Create setting object //
				Local newSetting:tFRSetting = New tFRSetting
				newSetting.id = sSettingName
				newSetting.value = sSettingValue
				
				' // Add this new setting object to the file class //
				ListAddLast Self.settings, newSetting
			End If
		Wend
		
		CloseStream strmFile
	End Function
	
	Function saveFile(fileName:String)
		
		Local strmFile:TStream
		Local s:tFRSetting
		
		strmFile = WriteFile(fileName)
		
		For s = EachIn self.Settings
			WriteLine strmFile, s.id + "=" + s.value + ";"
		Next
		
		CloseStream strmFile
		
	End Function
End Type


Function FRLoadFile:tFRFile(fileName:String)
	Local newFile:tFRFile = New tFRFile
	newFile.fileName = fileName
	newFile.loadRaw(fileName)
	
	Return newFile
End Function

Print "  Module: FileReader Loaded"



Whats going on there.