Hi there, I've had this problem for months and I still don't know how to fix it

I have made a bow and arrow type weapon, and depending on its charge animation frame, shoots an arrow at a specific velocity. What the problem is, is soon after loading a map, and charging up an arrow, it crashes the server. But if I wait for a while, its safe to use it. It's been driving me nuts
Below is the code from weapons.qc
And this is from player.qc
If this isn't enough information, I can provide a link to all my .qc files. I've got a few more bugs to handle too, but it might be asking for much to ask for help on those too
Thanks for reading.