Hammer Editor – “Unexpected End of File” On Load, Reading Chunks 33%

hammer

First of all, I know questions similar to this have been answered, but yet I cannot find the solution.

I was saving my map after doing some stuff with logic entities. Upon saving, Hammer quit without any message. Upon attempted loading, Hammer comes up with "File C:…mapname.vmf, line 18838: unexpected end of file", with another window saying "Loading Chunks…" Then 33%. I have read that editing the .vmf file to add a curly bracket } at the end to close the whatever it's called. I found mine was missing one, so I added it, now when ever I open the same map it loads to 33% again, then crashes, all in under a second.

So, simply: Any solutions? Also, I am using the Hammer Editor with HL2 in the base.

It's kind of sad I have to write this one about 2 hours after my other H.E question.

Best Answer

Your map file is corrupted.

You can either put a closing } into line 18838 (the one the game complains about) or if that doesn't work you can replace it as follows:

  • rename your <mapname>.vmf to something else (or make a backup)
  • locate the <mapname>.vmx in your mapsrc folder and copy it over
  • rename the vmx extension to vmf
  • try to load the newly renamed <mapname>.vmf in Hammer

If that still doesn't work your last resort lies inside your <HammerFolder>/autosaves. If you have some autosave files you can try one of these to recover your map. They might not be the latest version, but still better than nothing.