Nail gun problems. (Please Help) Created 1 year ago2023-02-11 00:38:00 UTC by RoJAn RoJAn

Created 1 year ago2023-02-11 00:38:00 UTC by RoJAn RoJAn

Posted 1 year ago2023-02-11 00:38:00 UTC Post #347327
So, you see... i was trying to make a nail gun with no success, i always get this code error every time:
1>hl_weapons.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CBasePlayer::Touch(class CBaseEntity *)" (?Touch@CBasePlayer@@UAEXPAVCBaseEntity@@@Z)
1>Debug\hl_cdll\client.dll : fatal error LNK1120: 1 unresolved externals
So at one point i give up and scrapped all the code, doing something more "easy" instead, and by easy i mean copy pasting the crossbow code. It did compile well, by the exception of the client syde, that get me the same error, so i just change the hldll. Everything was running preaty well, until it was the moment to shoot the gun:
Host_Error: PF_precache_model_I: 'models/nail.mdl' Precache can only be done in spawn functions
The only thing i want to know is what and how to solve this issue, if you ask what the code is, well... is the same as a Crossbow. But now the thing is... if the way to solve this problem is to compile the cl_dll, well... TOO BAD! because i dont know what is the main cause of the problem.
You would say that the weapon is bad writed on the hl_weapons.obj, like i thinked it was, but then i thinked on compiling the cl_dll of a separated source code, where i didnt even touch the client or the regular dlls. And this happens:
1>hl_weapons.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CBasePlayer::Touch(class CBaseEntity *)" (?Touch@CBasePlayer@@UAEXPAVCBaseEntity@@@Z)
1>Debug\hl_cdll\client.dll : fatal error LNK1120: 1 unresolved externals
It results... the main base code for the client that i worked whit was busted from the start all along, i need to clarify that im not using the SoloKillersSDK, im using the 2013 Valve realease.
If you know how to solve the problem whithout deleting all my progress, i will thank you a lot, words cannot describe my sheer fucking confusion right now...
Posted 1 year ago2023-02-11 01:48:15 UTC Post #347328
Ok, so i already found a way to solve the cl_dll compilation problem, the client was detecting a cvar created by me in the player.h, that basically enables semiclip, because client wasnt capable to process this new cvar, the compilation gived errors, so i added an #ifndef / #endif on the void... and it works!

Now my main problem is still how to solve the issue of firing the projectile:
Host_Error: PF_precache_model_I: 'models/nail.mdl' Precache can only be done in spawn functions
Posted 1 year ago2023-02-11 05:37:53 UTC Post #347329
Now i solved the problem, i used bad the UTIL_PrecacheOther();.
Maybe i could do a video showing the nailgun.
You must be logged in to post a response.