Hammer broke my maps again [Solved]

Avatar
baca25
342 Posts
Posted Nov 29, 2011
So I was saving two of my maps, then hammer froze when they were saving and then crashed. So then I reopened the maps and now when I try to open them, you see the flash of the load bar, then an error that says... "File C:\Program Files (x86)\Steam\steamapps\common\portal 2\sdk_content\maps\mp_coop_racers_2.vmf, line 47: unexpected end of file" press OK, then it crashed hammer.
Sooo... my question is, how do i fix this, and where are the auto save files located. I really don't feel like decompiling my maps from their BSP's.
Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Nov 29, 2011
Replied 1 hour later

baca25 wrote:
Sooo... my question is, how do i fix this, and where are the auto save files located. I really don't feel like decompiling my maps from their BSP's.

First of all, hammer makes a .vmf backup file called a .vmx which saves after a successful compile. To open in hammer, just search for the correct .vmx in the same directory as your saved .vmf should be (make sure you change the available extentions to .vmx in the drop down menu).

Secondly, you can also load the map from an autosave which would be located usually on the main drive e.g. C:/HammerAutosave.

The extra alternative would be to actually open up the corrupt .vmf through a text editor and put in extra brackets till it does open. I would stay away from this option as probably the files were corrupt because hammer crashed half way through writing the files.

Avatar
Robdon
204 Posts
Posted Nov 29, 2011
Replied 1 minute later
Hi,

You should have a backup in that same dir as the VMF file.

When you compile a map it copies the VMF file to a VMX file as a backup. So if you rename the VMX file to VMF it should atleast give you the last version from when you compiled. That might not help if you havent compiled recently though as some stuff will be missing.

Or, you could attach your VMF here and I could take a look at it and see why its not loading, but it sounds like it only saved part of the file.

Rob.

Avatar
baca25
342 Posts
Posted Nov 29, 2011
Replied 3 minutes later
ya i been looking at the vmf right now, there is not much on it at all. So thats all gone. Guess I lose an hour of work. Well hour and a half for both maps...
Edit
Scratch that, lost 30min because the autosaves did save some of the work I did. A thank you.
Avatar
DaMaGepy
361 Posts
Posted Nov 29, 2011
Replied 3 hours later
I use 5 min as autosave and ocassionally pressing ctrl+S
Avatar
iWork925
1,080 Posts
Posted Dec 01, 2011
Replied 2 days later
A couple of tip I learnt from personal experience:

1) as damagepy said; set the autoave time really low
2) hit ctrl+s everytime you do anything in hammer
3) invest in ram: earlier this year I went from 4gb econo-ram to 12gb of corsair dominator enthusist ram, and I really noticed an immediate and severe reduction in crashes. (Went from about 1-2 per day to about 0-1 per week.)

Avatar
Thornscrup
45 Posts
Posted Jun 06, 2013
Replied 1 year later
Hey,

I had the same message but the problem was different. I found the solution on the Steam Wiki, but I'm posting it here anyway for those who would have the same problem as me and end up on this page like I did.

Plus, I'm so happy I found the solution I just have to share it. :lol:

-> SOMETIMES, it's not a braket that is messing things up. Sometimes, it's...THE QUOTES. :evil:
For example, if you put quotes within a game_text entity, like me, that's not good. The quotes are used to mark comments in the .vmf file, so that's why they can corrupt the code.

All you have to do in that case is search for the quotes in the file with NotePad, and remove it.

And that's how I didn't lose days of work.

Hope this'll help someone, someday!

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jun 06, 2013
Replied 5 hours later
The last post from this thread was in 2011 dude! Locking