I posted this in the Fenix Mod thread, but I think every Mod should have this included
'Smart' error handling... Well, on file loading that is
Below is my original post in a quote.
Quote: "Looking good.
I have an other idea though... You know how FPS Creator bugs up every now and then? Telling that it can't find a file? How about making a 'smart' error... Like on every file it tries to load, Check if the file exists with the following function, if it doesn't it will return a USEFULL error and then shut down.
Function CheckFileExist(FileName$)
If File Exist(FileName$)
ExitFunction 1
Else
Exit Prompt "ERROR : File '"+FileName$+"' Could not be located! Please check wether it exists or not.","Error"
End
Endif
EndFunction
This function is used as :
Result = CheckFileExist("C:MyFile.txt")
It returns a 1 if the file exists, and will hand out a proper error and shuts down when it does not. This will make it a lot easier to debug *.fpe/*.fps or whatever files.
"
And yes, I'm the kind of freak that puts every little thing in a function... Just keeps it more organized in my opinion
It's not the world that turns against you, it's you that turns against the world.