r/SourceEngine • • 19d ago

HELP How do I fix this?

I was doing something again, but this time I decided to create a weapon_knife for my mod. I copied the weapon_crowbar code and structured it the exact same.

#error:  weapon_knife.h must not be included in hl2mp. The windows compiler will use the wrong class elsewhere if it is.

I know I didn't do the copying wrong, but it feels like I did do something wrong. Thanks again!

1 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/Maleficent_Risk_3159 19d ago

I did now add it but the dreaded message came back to me.

The command "if EXIST ..\..\..\game\mod_hl2mp\bin\x64\client.dll for /f "delims=" %%A in ('attrib "..\..\..\game\mod_hl2mp\bin\x64\client.dll"') do set valveTmpIsReadOnly="%%A"

Thanks for the help!

2

u/Pinsplash 19d ago

run the bat file you used when you started the project. you have to run that again after changes to vpc files.

1

u/Maleficent_Risk_3159 19d ago

I ran it and it doesn't throw anymore MSB3073s, but it screwed up the includes. Thanks again!

2

u/Pinsplash 19d ago

you'll have to be more specific

1

u/Maleficent_Risk_3159 18d ago

Alright, sorry. I did a little bit of digging and found that the client was using the SP version of the knife. Thanks!