I need urgent help, unexpected end of file error.

Mr. Origen

L1: Registered
Nov 24, 2017
8
1
After staying up late many nights, for countless days, and after putting my heart and soul into this map, it comes up with an error. I can't load it, and me being stupid i forgot to enable autosaves. I need help, I'm afraid of losing all of my hard work.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
What error specifically are you getting?

The .vmx file is a backup of a previous version of the map. Change the extension to .vmf and try opening that.
 

Mr. Origen

L1: Registered
Nov 24, 2017
8
1
The error is "File C:\Hammer Tools\abstruse\trade_abstruse_v2.vmf, line 453745: unexpected end of file. The .vmx file gives the same error when renamed.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
You'll probably have to post your .vmf.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
I figured out the problem. When I opened the .vmf in Notepad++, I discovered that you had placed quotes(" ") in the message keyvalue of an env_hudhint. Avoid this, as it corrupts the file. Removing the quotes fixed the problem. The repaired .vmf file is attached.
 

Attachments

  • trade_abstruse_v2.vmf
    9.8 MB · Views: 243

Mr. Origen

L1: Registered
Nov 24, 2017
8
1
Thank you so much! You're a lifesaver. Is there any way I can thank you? Do you want a key or something?
 

killohurtz

Distinction in Applied Carving
aa
Feb 22, 2014
1,016
1,277
Yeah, nested quotes are no bueno. If you need to use them in a printed message, you can use these directional quote characters “ ” (as opposed to " ") to avoid parsing them as part of the vmf syntax.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
I'm fine, thank you. Someone else could have done the same thing- this can happen more commonly than you think, this website is designed to help people out with errors and mistakes like this. Besides, I'm not one who really cares about amassing a digital inventory.
 

Oni134

L2: Junior Member
Jul 29, 2018
60
19
hi, i know this post is old but how i can find the line?
I am very desperate and stressed :c
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
First off, next time you have an issue, I recommend creating your own thread, as that will get more views, rather than posting on a really old thread.

Second, what's the exact error that you are getting? Did you do anything that you think caused the error? For example, did you put a double quote (") in an entity keyvalue or output parameter? If you know what entity the problem is in, do CTRL-F in your text editor to find the entity class or name, then read the nearby lines to find where the improperly placed character is and delete it.

Alternatively, you can try the VMX. The VMX is effectively a backup of your VMF, except it's always a few revisions behind your VMF. To open the VMX, simply rename it and change the extension to VMF, then see if you can open it in Hammer.

The more information you provide about your problem, the easier it will be for us to help.
 

Oni134

L2: Junior Member
Jul 29, 2018
60
19
I was just editing my map when suddenly hammer crashed and i lost everything (including the vmx) and i tried decompile my bsp

but I get the same error:
upload_2019-5-8_19-54-57.png

(sorry for the bad english)
 

Attachments

  • upload_2019-5-8_19-49-53.png
    upload_2019-5-8_19-49-53.png
    6.1 KB · Views: 207

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
What do you mean by "lost everything"? The files got deleted? The error persists with all versions of the file? Etc.

If you're comfortable doing so, you may wish to post the VMF and have one of us evaluate it.
 

Oni134

L2: Junior Member
Jul 29, 2018
60
19
i lost the progress of the map in all files (vmf and vmx)

that's why I can't do the option of renaming the vmx

The file:
 

Attachments

  • cp_traintown_beta2.vmf
    2.8 MB · Views: 185
Last edited:

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
It does, in fact, appear like part of the VMF was chopped off- I'm not sure how much you lost, hopefully not much though. Plenty of brushwork seems to be intact. I made the VMF usable again by adding a closing bracket (}) to the end of the file to close off the open statements, and I was able to open it in Hammer from there.
 

Attachments

  • cp_traintown_beta2_fixed.vmf
    2.8 MB · Views: 199

Oni134

L2: Junior Member
Jul 29, 2018
60
19
pheww... i just lost all the props but its great now i can put everything correctly and detailed

Thank you so much! :D i was very sad