Unable to open output file

1623

New member
Hi Everyone,

I’ve tried absolutely everything and this is my last resort, about a week ago my computer came up with an error saying that one of the files in cache was corrupted, I did a bit of digging and couldn’t find anything. The game was running completely fine and nothing was going wrong. Until the next day when I opened up the game and it continued to crash. It kept opening and wanting to do a database reset but when I got to the faulty section it crashed. I tried holding down control and database rebuild but it continue to crash when it got to “faulty” I turned off my antivirus I restarted my computer several times to no avail. This led me to uninstalling my game. I lost all of my content restarting. When I reinstall it it either doesn’t install the game or install it and then a couple days later starts doing the same thing. Today I finally got it to work and it was working for a couple of hours until I did a chkdsk CHKDSK scan, that is when all of my custom content and anything I downloaded afterwards refuse to work, coming up with the era “unable to open output file” and/or “Syntax error in script”…

I am completely over it and about to give up on the entire game completely, I have enjoyed this game for many years and to lose it all within a week is absolutely devastating. Please can someone help me….

Many thanks…
 
First of all, you have not yet lost all your content unless you delete it manually

Your previous content would be found in a folder titled build xxxxxxxxxx (xxxxxxxxxx means a bunch of random letters and numbers) located in the path below, providing if you haven't changed your Trainz user data to a custom path, otherwise the default location is C:\Users\%Username%\AppData\Local\N3V Games inside the TANE/TRS19/TRS22 folder, if you have more than one build xxxxxxxxxx folder this could be the cause of your problems! Trainz doesn't like us having multiple database's which I discovered only a few days ago as I wanted to not only have one main database with everything there, but I also wanted a second database with a clean installation without anything installed in order to troubleshoot some assets.. But during a database rebuild, Trainz was complaining about having 2 database's which was conflicting with each other.

So, the more times you install Trainz! The more times it creates a newer database "Build xxxxxxxxxx" folder with files and other folders. I am thinking this is what many people are going through! Thinking uninstalling and reinstalling the game multiple times can cause database's to become corrupted

Navigate to

C:\Users\%Username%\AppData\Local\N3V Games then open either TANE, TRS19 or TRS22 folder then open Build xxxxxxxxxx folder "Again, if you have several database build xxxxxxxx folders" sort by date so that you backup the correct folders to move them into your current database.

Copy Local, Original and Packages folders and paste them into your current "New installation" database build xxxxxxxxx folder
Once that is done, delete all previous database build xxxxxxxxx folders using "Shift + Delete" keys this will delete them from your computer and not send them to your Recycle bin

Launch either TANE, TRS19 or TRS22 | Click on Developer on the Trainz launcher and choose Database Rebuild
And.... Hopefully this will solve your problems
 
I am going to assume you are running some version of Windows. If so, I would "Roll Back" to a "System Restore Point" prior to when you 1st had the issue appear using the built in Windows System Restore tool. You could use the System File Check cmd - "SFC /scannow" as Administrator, from Powershell or Safe Mode are other options. You could possibly try to use the DISM cmd as a last resort before "blowing out your box". Just some things to "keep in your hip pocket" for now or in the future.
Again I am making the assumption you are running some version of Windows, the version is unknown and your system and drivers are fully patched/updated.
 
Last edited:
First of all, you have not yet lost all your content unless you delete it manually

Your previous content would be found in a folder titled build xxxxxxxxxx (xxxxxxxxxx means a bunch of random letters and numbers) located in the path below, providing if you haven't changed your Trainz user data to a custom path, otherwise the default location is C:\Users\%Username%\AppData\Local\N3V Games inside the TANE/TRS19/TRS22 folder, if you have more than one build xxxxxxxxxx folder this could be the cause of your problems! Trainz doesn't like us having multiple database's which I discovered only a few days ago as I wanted to not only have one main database with everything there, but I also wanted a second database with a clean installation without anything installed in order to troubleshoot some assets.. But during a database rebuild, Trainz was complaining about having 2 database's which was conflicting with each other.

So, the more times you install Trainz! The more times it creates a newer database "Build xxxxxxxxxx" folder with files and other folders. I am thinking this is what many people are going through! Thinking uninstalling and reinstalling the game multiple times can cause database's to become corrupted

Navigate to

C:\Users\%Username%\AppData\Local\N3V Games then open either TANE, TRS19 or TRS22 folder then open Build xxxxxxxxxx folder "Again, if you have several database build xxxxxxxx folders" sort by date so that you backup the correct folders to move them into your current database.

Copy Local, Original and Packages folders and paste them into your current "New installation" database build xxxxxxxxx folder
Once that is done, delete all previous database build xxxxxxxxx folders using "Shift + Delete" keys this will delete them from your computer and not send them to your Recycle bin

Launch either TANE, TRS19 or TRS22 | Click on Developer on the Trainz launcher and choose Database Rebuild
And.... Hopefully this will solve your problems
Thank you for your advice, it did work for a couple of days and then out of the blue today it began to crash again, again it happens when there’s a “rebuild database” There is no extra files for my databases…
 
I am going to assume you are running some version of Windows. If so, I would "Roll Back" to a "System Restore Point" prior to when you 1st had the issue appear using the built in Windows System Restore tool. You could use the System File Check cmd - "SFC /scannow" as Administrator, from Powershell or Safe Mode are other options. You could possibly try to use the DISM cmd as a last resort before "blowing out your box". Just some things to "keep in your hip pocket" for now or in the future.
Again I am making the assumption you are running some version of Windows, the version is unknown and your system and drivers are fully patched/updated.
I don’t remember what version of windows I had when it first started doing this… I’ve never had a problem like this before and no one else is having the same issue…
 
Hmmm. This behavior makes me think "bad sectors" on your Trainz Harddrive may be the issue.
How old is the drive? @JCitron - what do you think?
That's my thought as well. The hard disk is failing somehow or somewhere.
He could clear the cache/internet and cache/libraries folders, but I would definitely backup the data first and check the disk for errors.

If it's an SSD, I'd replace the drive ASAP because when they die, they go quickly usually without warning.
 
Hmmm. This behavior makes me think "bad sectors" on your Trainz Harddrive may be the issue.
How old is the drive? @JCitron - what do you think?
I only bought the hard drive last year, and I have never had any problems with it until recently, everything else that runs on the hard drive is completely fine
 
I only bought the hard drive last year, and I have never had any problems with it until recently, everything else that runs on the hard drive is completely fine
That's good. Wouldn't hurt to check for a bad sectors issue by running the chkdsk task via error checking for that drive.
 
When I had done that scan initially it got rid of all of my content and made the game worse, I don’t know if that was because all of the files were corrupted or something but it definitely made the game worse… I’m running out of options.. it would start scanning for faulty dependencies and then that’s when it would crash, I can’t delete any of the dependencies. I can’t do anything, as soon as it starts scanning for faulty dependencies it crashes…
 
How full is your C drive? Trainz data scan needs a lot of temporary storage space and memory while it checks the database.
My trainz files are located in a different drive (F: Drive), however both drives have got adequate space, although I have never had a problem with my C drive being to full before…
 
When you install Trainz the program installs where you ask it to (F drive) but the data goes to the C drive. Each install adds a new data folder to the C drive. Have you moved the data folder to your F drive?
 
When I had done that scan initially it got rid of all of my content and made the game worse, I don’t know if that was because all of the files were corrupted or something but it definitely made the game worse… I’m running out of options.. it would start scanning for faulty dependencies and then that’s when it would crash, I can’t delete any of the dependencies. I can’t do anything, as soon as it starts scanning for faulty dependencies it crashes…
This sounds like the data was corrupted. When this occurs, the files are converted to "lost chains" and become worthless and useless for anyone, including programs, to read. If your content is trashed like this, you may as well as format the hard drive and chock it up to a loss.

Having said that, this is why we make backups of everything all the time. There is no need for fancy software to do this. All you need to do is copy your complete data-folder to another hard disk, not to the same drive, and do this more often than not. Come up with a backup schedule and stick with it.

Backups are like insurance. You pay by making backups, but never use them. It's that one time that you don't have a backup is when you end up SOL. Don't think you are the only one. We've all been caught, including us IT professionals.
 
This sounds like the data was corrupted. When this occurs, the files are converted to "lost chains" and become worthless and useless for anyone, including programs, to read. If your content is trashed like this, you may as well as format the hard drive and chock it up to a loss.

Having said that, this is why we make backups of everything all the time. There is no need for fancy software to do this. All you need to do is copy your complete data-folder to another hard disk, not to the same drive, and do this more often than not. Come up with a backup schedule and stick with it.

Backups are like insurance. You pay by making backups, but never use them. It's that one time that you don't have a backup is when you end up SOL. Don't think you are the only one. We've all been caught, including us IT professionals.
How many hard drives am I buying?
 
What is the path that settings/install shows?
Verified publisher: N3V Games Pty Ltd

File origin: Hard drive on this computer

Program location: "C:/Users)xxxxx\AppData\Local\Temp \RarSFX6\installexe" -target "F:/Trainz 19/Trainz Railroad

Simulator 2019" -escalationstage 1-start - launchtargetonexit
 
If you say all files are on your F drive, your path should not be to the C drive.
My setup is

Program location
My shortcut points to the Trainz .exe on my D drive.
"D:\Trainz\Trainz 2019 110491\TRS19.exe"

Data folder location
If not moved, my settings/install points to the build folder on my C drive.
"C:/Users/****/AppData/Local/N3V Games/trs19/build qig74gf71"
If I moved the folder to my D drive it would be
"D:\Trainz\Data\build qig74gf71"
 
How many hard drives am I buying?
That's up to you. I use my system for other things besides Trainz thus my four internal drives. I keep my Trainz data on my F: drive and beta-testing and other older versions on my D; drive. E is used for music editing due to its large size. Music files are huge, running about 1/2 TB for 4 minutes before being compressed.

I do recommend an external backup drive regardless. Don't get the kind that use the USB for power because they can't handle lots of data. Get one of the powered with a power brick.
 
Back
Top