Source SDK

Source SDK

hilaxo122 Jul 26, 2024 @ 8:35am
unexpected end of line
i have an error of opening of one of my maps that im working on and every time i try to open it it says "unexpected end of line (number)"
pls help
< >
Showing 1-14 of 14 comments
You usually get that error when trying to decompile a protected map. This has never happened to me when opening my own maps.
Infinite_Data Jul 26, 2024 @ 8:47am 
"Unexpected EOL" errors usually come from incorrect code syntax - like opening an "if" statement, then never closing it properly. The compiler expects a continuation of the statement because you never signalled it to finish it, but then it encounters different code instead, so it gets all confused.

If you've managed to get such an error in your map, there's one very likely reason for it - an unexpected quotation mark symbol. Hammer isn't safeproofed against incorrectly nesting quotation marks within the VMF file; if you use one in an entity that accepts text strings, it can be written incorrectly into the VMF, so that what you intended to be a literal quotation mark gets interpreted by the compiler as a part of the code. It then runs into this rogue symbol and misinterprets it as a flaw in the code structure.

There is only one solution, as far as I know, and it's an obvious one - open your map's VMF file, go to the indicated line number and see what's wrong with it.

If you can't figure out what's wrong with the code, post it here (preferably the indicated line and a few before and after it). I don't deal with maps in text format, but if it is just a rogue quotation mark (or something similar), it should be easy enough to catch.

That is assuming that by "(number)", you mean there is an actual number there. If it really just says "number", then I'm afraid you're out of luck, since unless you find someone who knows how to catch the issue manually, I don't think there's much that can be done to fix the VMF. In that case, your best option will unfortunately be to just revert to previous versions until you find one that works.
hilaxo122 Jul 26, 2024 @ 8:48am 
and then it crashes and now that i redownloaded hammer it says "failed to load the default scheme file. the map views may be missing some visual elements." then :"file C:\Users\(my name)\onedrive\destop\creating\source_engine_model_editor_hl2\1thing.vmf, line 4574: unexpected end of file"
hilaxo122 Jul 26, 2024 @ 8:51am 
infinite_data
that (number) part means the number 4574 and i think im posting a video too so wait a little
hilaxo122 Jul 26, 2024 @ 9:21am 
i cant upload videos on steam but i can send the link to the video and no, this is not malware or something like that just a unlisted video on my youtube account
https://www.youtube.com/watch?v=s0P3PQay-WA
hilaxo122 Jul 26, 2024 @ 9:25am 
and i tryed to use the " game_text" with a trigger but it didnt work so i reopened it and now that
hilaxo122 Jul 26, 2024 @ 9:41am 
https://www.youtube.com/watch?v=WYVQFJ4hfzg
the line 4574 where it crashes
hilaxo122 Jul 26, 2024 @ 9:42am 
i dont know how this works

im panicking
Last edited by hilaxo122; Jul 26, 2024 @ 9:42am
Infinite_Data Jul 26, 2024 @ 9:56am 
Firstly, videos aren't helping. You can just copy the text and it will be easier for both of us.

That being said, you're looking in the log. You have to check the map's VMF file.

The "missing default scheme file" error comes from trying to run Hammer from the outdated and broken Source SDK.

It might be helpful if you remember exactly what you did with the game_text entity. It seems to align with my suspicion, and it would make it easier to know what to look for in the VMF. And also tell you what not to do in the future.
hilaxo122 Jul 26, 2024 @ 12:06pm 
so i used a website and this is the gametext in the line 4574 in the first vmf file

entity
{
"id" "2323"
"classname" "game_text"
"channel" "1"
"color" "100 100 100"
"color2" "240 110 0"
"fadein" "1.5"
"fadeout" "0.5"
"fxtime" "0.25"
"holdtime" "1.2"
"message" "if you want more guns enable "sv_cheats 1" and use "impulse 101""
"targetname" "text_test_1"
"x" "-1"
"y" "0"
"origin" "466.327 158.594 9"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[1000 8500]"
}
}
hilaxo122 Jul 26, 2024 @ 12:08pm 
and this in the second file

entity
{
"id" "2323"
"classname" "game_text"
"channel" "1"
"color" "100 100 100"
"color2" "240 110 0"
"fadein" "1.5"
"fadeout" "0.5"
"fxtime" "0.25"
"holdtime" "1.2"
"message" "if you want more guns enable "sv_cheats 1" and use "impulse 101""
"targetname" "text_test_1"
"x" "-1"
"y" "0"
"origin" "466.327 158.594 9"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[1000 8500]"
}
}
Infinite_Data Jul 26, 2024 @ 12:20pm 
Originally posted by hilaxo122:
"if you want more guns enable >>"<< sv_cheats 1 >>"<< and use >>"<< impulse 101 >>"<<"
And there you go - there are your nested quotation marks. As you can see, they appear in the VMF as the exact same quotation marks that mark elements of code, so they end up being misread by the compiler which can't tell they're only meant to be part of the text string.

I've never tried it myself, but as far as I know, you should be able to just delete the quotation marks within the VMF and get the map to load again.
Last edited by Infinite_Data; Jul 26, 2024 @ 12:22pm
hilaxo122 Jul 28, 2024 @ 3:28pm 
what soft ware should i use to change the vmf file?
Infinite_Data Jul 28, 2024 @ 3:31pm 
It's just a text file, you can open it in anything that reads text files.
< >
Showing 1-14 of 14 comments
Per page: 1530 50