I need urgent help, unexpected end of file error.

Discussion in 'Mapping Questions & Discussion' started by Mr. Origen, Jan 5, 2018.

  1. Mr. Origen

    Mr. Origen L1: Registered

    Messages:
    8
    Positive Ratings:
    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.
     
  2. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    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.
     
  3. Mr. Origen

    Mr. Origen L1: Registered

    Messages:
    8
    Positive Ratings:
    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.
     
  4. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    You'll probably have to post your .vmf.
     
  5. Mr. Origen

    Mr. Origen L1: Registered

    Messages:
    8
    Positive Ratings:
    1
    Here it is.
     

    Attached Files:

  6. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    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.
     

    Attached Files:

  7. Mr. Origen

    Mr. Origen L1: Registered

    Messages:
    8
    Positive Ratings:
    1
    Thank you so much! You're a lifesaver. Is there any way I can thank you? Do you want a key or something?
     
  8. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,022
    Positive Ratings:
    1,198
    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.
     
  9. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    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.
     
    • Like Like x 2
  10. Oni134

    Oni134 L2: Junior Member

    Messages:
    51
    Positive Ratings:
    11
    hi, i know this post is old but how i can find the line?
    I am very desperate and stressed :c
     
  11. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    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.
     
  12. Oni134

    Oni134 L2: Junior Member

    Messages:
    51
    Positive Ratings:
    11
    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)
     

    Attached Files:

  13. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    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.
     
  14. Oni134

    Oni134 L2: Junior Member

    Messages:
    51
    Positive Ratings:
    11
    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:
     

    Attached Files:

    Last edited: May 8, 2019
  15. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,248
    Positive Ratings:
    842
    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.
     

    Attached Files:

    • Thanks Thanks x 1
  16. Oni134

    Oni134 L2: Junior Member

    Messages:
    51
    Positive Ratings:
    11
    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