'Host_Error: PF_Precache_Model_L "m Created 12 years ago2011-09-07 23:29:35 UTC by gameaddict117o7 gameaddict117o7

Created 12 years ago2011-09-07 23:29:35 UTC by gameaddict117o7 gameaddict117o7

Posted 12 years ago2011-09-07 23:29:35 UTC Post #298730
Hi. I seem to be having a ton of problems with HL modding/mapping, lol.

Anyway, I tried making a new weapon (really a modified copy+paste of MP5.cpp) and I'm 99.99999% sure I got everything right because when I compiled the dlls I didn't get any errors.

But, when I go into the game (usually I go to the map "c2a5" [the "surface tension" chapter]) and try to use the console command "give weapon_m4", I get booted out of the game and the error 'Host_Error: PF_Precache_Model_L "models/v_m4.mdl" Precache can only be done in spawn functions!' comes up in the console.

What does "Precache can only be done in spawn functions!" mean? I extracted the models to my default HL models folder (after making backup dll files).

The models 'v_m4.mdl' , 'p_m4.mdl' , and 'w_m4.mdl' are in my HL's models folder (E:/SIERRA/Half-Life/valve/models) and it still gives me this error.

What's up? Is it because the weapon isn't loaded in the default maps, kind of like trying to spawn a monster that isn't loaded in the map?
Posted 12 years ago2011-09-08 00:16:09 UTC Post #298731
Oh.. add the model in a secluded area. It'll detect the .mdl, which it is somehow unable to, and will continue the map allowing the player to use the model. This is a rare error that I've had before.
Dimbeak DimbeakRotten Bastard
Posted 12 years ago2011-09-08 01:59:08 UTC Post #298732
Ohh. Thanks Dimbark! :) Where have you had the error before? Just curious.
Posted 12 years ago2011-09-08 02:15:34 UTC Post #298733
check the spawn() and precache() functions in your m4.cpp, make sure the models are referenced correctly to the m4 models.
You must be logged in to post a response.