EDIT: BY THE WAY, I forgot to mention that this bug ONLY happens in MULTIPLAYER.
SINGLEPLAYER does not have this bug.
I am currently working on a laser beam SWEP where when primary fire is held down, a constant laser beam is emitted.
The laser beam is comprised of numerous custom effects initialized elsewhere/ (No problem finding them or anything like that, weapon works just fine when fired)
I have run into a nasty kind of problem I cannot seem to solve, if the owner of the weapon dies while firing it and emitting the effects. The console will be flooded with numerous and repeated errors.
Which all seem to source from the owner of the weapon no longer existing, and since the effects depend on them, it throws up errors. Yet I have tried many different solutions, If statements checking if the owner is no longer valid/alive/holding the weapon. If the weapon is valid… etc. None have seemed to fix this and I have run out of ideas.
Here is the SWEP’s code concerning ONE of the effects (The others have been commented for the sake of focusing on the issue. They act similarly anyways)
Here is the function for the effects declared inside of the SWEP file.
And here is the effect file itself.
If there is something I am doing abhorrently wrong, please let me know because I am at a total loss as of what to do at this point.
Thank you for your time.