I think my map is corrupted. (Solved)

Avatar
Goldenknighttim
182 Posts
Posted Jan 10, 2014
I After a week of doing little else than working on this map, I try to run it, for what I think may be the final test. Then it doesn't compile. I exit, and get back in, and it gives this message:

File C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\DIY Rube Goldberg\diyrg.vmf, line 92771: unexpected end of file

Is there a way I can repair this, or a way I can decompile my most recent .bsp? I was hoping to finish this tonight. It was for a week long challenge that ends tomorrow evening, and I would like time for feedback from my friends.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Arachnaphob
412 Posts
Posted Jan 10, 2014
Replied 12 minutes later
Try copying your .vmx file of your map and renaming it as the .vmf. Be sure to move your old .vmf just in case.
Avatar
Goldenknighttim
182 Posts
Posted Jan 10, 2014
Replied 4 minutes later
Thanks Arachnaphob, but it didn't work.
Avatar
Sejievan
232 Posts
Posted Jan 10, 2014
Replied 12 minutes later
Well you can try to load an autosaved file from Hammer... but normally you have to redo a lot of stuff..
mine is set on this path.. (but i don't remember if i changed, or if Portal 2 even has an default one =P)

c:\program files\steam\steamapps[USERNAME]\sourcesdk\bin\source2009\bin\HammerAutosave\

if not work, you can just decompile your newest .bsp version with BSPSource

Avatar
FelixGriffin
2,680 Posts
Posted Jan 10, 2014
Replied 1 minutes later

Goldenknighttim wrote:
I After a week of doing little else than working on this map, I try to run it, for what I think may be the final test. Then it doesn't compile. I exit, and get back in, and it gives this message:

File C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\DIY Rube Goldberg\diyrg.vmf, line 92771: unexpected end of file

Is there a way I can repair this, or a way I can decompile my most recent .bsp? I was hoping to finish this tonight. It was for a week long challenge that ends tomorrow evening, and I would like time for feedback from my friends.

I believe you can get that error from a problematic quotation mark in a KeyValue. Did you try to pass a string to a script function or use quotes in a game_text?

If you remember doing this, you can look for that entity in the VMF file in Notepad++ and remove the offending punctuation. Then reload your map in Hammer, save again, and compile.

Avatar
Goldenknighttim
182 Posts
Posted Jan 10, 2014
Replied 2 minutes later
Thanks. I just found out how to decompile the .bsp, but it would be nice to not have to go back a bit. I did have a quote in a game_text.
Advertisement
Registered users don’t see ads! Register now!
Avatar
srs bsnss
552 Posts
Posted Jan 11, 2014
Replied 2 hours later
Ah, quotes in a game_text is what's got ya then. For future reference, opening up the .vmf in a text editor (such as notepad) and locating the indicated line (in this case, 92771) will allow you to fix it. Just go to the line, find where your message is written, and remove the quotation marks.

That's the wonderful thing about .vmfs. They're basically .txt files, so if anything goes wrong, all you have to do is open them in the most basic text editor and re-write a few things.