source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Can't compile Client(TF), Server(HL2MP) and Server(TF)

Open Aknotofknots opened this issue 7 months ago • 7 comments

I get these errors when trying to compile the code:

  • MSB8066 Custom build for '....\game\shared\base_gcmessages.proto;....\game\shared\econ\econ_gcmessages.proto;....\gcsdk\steammessages.proto;....\game\shared\tf\tf_gcmessages.proto;....\game\shared\tf\tf_proto_def_messages.proto' exited with code 1. Client (TF) C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 254

  • MSB8066 Custom build for 'spawn_helper.nut;vscript_server.nut' exited with code 1.

  • MSB8066 Custom build for '....\game\shared\base_gcmessages.proto;....\game\shared\econ\econ_gcmessages.proto;....\gcsdk\steammessages.proto;....\game\shared\tf\tf_gcmessages.proto;....\game\shared\tf\tf_proto_def_messages.proto;spawn_helper.nut;vscript_server.nut' exited with code 1.

I have looked at these issues: #617 and #635

I have tried installing python as mentioned in the above issues and made sure python ( 3.13.2) is in my PATH (C:\Users\blablabla\AppData\Local\Programs\Python\Python313) by typing "python" or "py" in CMD.

I have Visual Studio 2022 community 17.13.5 with Windows 10 SDK (10.0.19041.0)

I haven't got a single clue whats going on here, help is greatly appreciated :)

Aknotofknots avatar Apr 03 '25 17:04 Aknotofknots

You're not the only one with this problem. I've noticed it in most people, including myself. There are 2 options, try to cut vscript from your mod, or wait for the SDK to be fixed, because they forgot to add a couple of important components for the backend.

F1ll0ver avatar Apr 03 '25 21:04 F1ll0ver

Try deleting spawn_helper.nut and vbscript_server.nut. After that, compile again and cut out all the code that the compiler will swear at, but when deleting defective code, do not go beyond these brackets-"{}". It helped me.

F1ll0ver avatar Apr 03 '25 22:04 F1ll0ver

Have you also checked https://github.com/ValveSoftware/source-sdk-2013/issues/700#issuecomment-2676217365 ? I had a lot of issues building until I added python and made sure the path was set correctly then I did the steps on the link I just posted and now I compile all projects with 0 errors.

Sub-Zero1324 avatar Apr 04 '25 02:04 Sub-Zero1324

@F1ll0ver @Sub-Zero1324

Thanx a lot !! will surely try 🧑‍🔧

Aknotofknots avatar Apr 04 '25 06:04 Aknotofknots

Guys, this problem is generally caused by your Python's version. Please just first remove all python from your env path and reinstall python 1.13

Andorlatch avatar Apr 05 '25 09:04 Andorlatch

@Andorlatch thanx, will try !

Aknotofknots avatar Apr 05 '25 11:04 Aknotofknots

Make sure there are no spaces in any of the parent directories containing your source code! Substitute the space with a different character such as - or _ and re-clone & compile the project. It fixed the issue for me.

BreadDoesStuff avatar Jun 20 '25 21:06 BreadDoesStuff

i moved the source code from my steamapps in my program files to its own folder on my C drive. This seemed to fix the issues with vscript not compiling correctly. I am on windows 10 and i used the windows 11 sdk recommended in the README, for python i used 3.13.1 . hope this helps for anyone else who ran into this issue.

reallyjustbarry avatar Jun 28 '25 21:06 reallyjustbarry

I reinstalled Python for 3.13.0, and deleted all spaces between name in directory folder and it worked

Dah4k2 avatar Sep 05 '25 13:09 Dah4k2