changing weapon_xxx.txt problem

S

swisher

Guest
I recently compiled a replacement for the hl2 crowbar, and to test it I changed the model inside of weapon_crowbar.txt to reflect it.

The orginal line:
"viewmodel" "models/weapons/v_crowbar.mdl"

and I changed it to this to test my new model
"viewmodel" "models/weapons/knife.mdl"

now when I start the game I get this error:
$modelname key for models/weapons/knife.mdl cannot start with a slash.
and my model never shows up in game, just blank space when I pull out the crowbar.

Anyone know why it's doing that? or What might be some possible causes so I can investigate..
 
Is all the other weapons v_something or another letter.. cuz maybe you gotta do that. or something.
 
I'm not sure what you are getting at, but I did change the other modelname key for the world model and it gives me the same error..
 
Just so everyone knows, and hopefully save someone some time. The problem lies with in the HL2 Compile Kit by Cannon Fodder. in Model Name you need to use forward slashes when defining the 'Name' i.e. 'weapon/v_m16'
if you put weapon\v_m16 it will cause the keyname error mentioned above..
 
thats handy to know why dont u tell cannonfodder because it seems that he has made a mistake in the coding of his softwar and put a forwards slash instead of a backwards slash.
 
actually, in programming it is standard practice on relative paths to put a / slash and a \ for full paths, examples are web coding for instance

Code:
[url=./mypage.htm]My Page[/url]

or

Code:
[img]images/myimage.jpg[/img]

Its not a mistake in his coding, its proper referenced pathing.
 
Back
Top