Can somebody tell me and/or fix this code so it will not say 'Stream does not exist'. This writes a file called '(your file name).inf' and a file called '(your file name).log'
File 2:
Thanks
I have figured it out.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;LogFile.bb ;Contains Functions to write .log files ;WARNING: ;You must create a Global called 'LogName$' For these to work ;Call Function SetLogName() first unless you have declared it in the program start up ;Call Function WriteLogFile() second unless you already have the file written ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function WriteLog(St$) file = ReadFile(FileName$ + ".inf") LogName$ = ReadString$(file) CloseFile(file) file = OpenFile(LogName$) WriteString(file,st$) CloseFile(file) End Function Function WriteLogFile(FileName$) file = ReadFile(FileName$ + ".inf") LogName$ = ReadString$(file) CloseFile(file) file = WriteFile(LogName$) CloseFile(file) End Function Function SetLogName(File$) file = WriteFile(FileName$ + ".inf") WriteString(file,FileName$ + ".log") End Function
File 2:
Include "LogFile.bb" ;That is the name of the file above SetLogName("example") WriteLogFile("example") WriteLog("Hello")
Thanks
I have figured it out.