source-sdk-2013
source-sdk-2013 copied to clipboard
Can't compile Client(TF), Server(HL2MP) and Server(TF)
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 :)
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.
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.
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.
@F1ll0ver @Sub-Zero1324
Thanx a lot !! will surely try 🧑🔧
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 thanx, will try !
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.
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.
I reinstalled Python for 3.13.0, and deleted all spaces between name in directory folder and it worked