[SOLVED] UpdateINIFile returns MAV error?
Posted: Sun May 01, 2016 12:52 pm
I'm trying to make this mod for myself, wherein the only difference is edited player mechanics more or less. "Check for errors" detects no errors so I go ahead to compile the new game. I end up on a MAV, with or without the launcher, so I enter debug mode to find that the UpdateINIFile function errors on "While Not Eof(f)", with message "Stream does not exist".
I have found nothing myself. I never touched this function at all. What have I really done that could be causing this? Here's the UpdateINIFile function for reference:
(I'm using Windows 10, I have latest version of Blitz3D and I also have all files necessary for a compilation to be possible.)
I have found nothing myself. I never touched this function at all. What have I really done that could be causing this? Here's the UpdateINIFile function for reference:
Code: Select all
Function UpdateINIFile$(filename$)
Local file.INIFile = Null
For k.INIFile = Each INIFile
If k\name = Lower(filename) Then
file = k
EndIf
Next
If file=Null Then Return
If file\bank<>0 Then FreeBank file\bank
Local f% = ReadFile(filename)
Local fleSize% = 1
While fleSize<FileSize(file\name)
fleSize=fleSize*2
Wend
file\bank = CreateBank(fleSize)
file\size = 0
While Not Eof(f) ;This is the line where the error occurs
PokeByte(file\bank,file\size,ReadByte(f))
file\size=file\size+1
Wend
CloseFile(f)
End Function