Thanks some really good advice guy
Quote: "
Quote: "If File Exist("Settings\Objects.OD") = 1 Then Delete File "Settings\Objects.OD"
//OPen file to write
Open To Write 1,"Settings\Objects.OD"
Write String 1,"This is a test write string""
should be
+ Code Snippet
TheFileName$ = "Settings\Objects.OD"
If File Exist(TheFileName$) = 1 Then Delete File TheFileName$
//OPen file to write
Open To Write 1,TheFileName$
Write String 1,"This is a test write string"
Now for some food, use Windows search and look for Objects.OD. I suspect the file is being written, just not where you expect it to be.
Also, If you have any other blocks of code that use file 1 for reading\writing make sure they close the file when complete. In other words
+ Code Snippet
Will silently fail if file 1 is already in use elsewhere\previously in your code and wasn't closed.
"
I think I failed to mention at the start that the "Settings\Objects.OD" file should either exist in a folder that has the origin location of the main .exe unless otherwise changed to a full directory, so I chose the more of a relative location approach. Not certain why the file would be written anywhere else.
Another thing, the array "object(n).num > 0" would be monitored and updated before the file saving function is called. The array is updated with a object number in an empty array index position(I mean the ".num" is checked for 0) every time an object is created and before I save there are 5 existing objects, both in the array and on screen.
Assuming everything I just said was true can anyone think of any other reason?
Otherwise I would have to re-write all my code bottom up :-(