Closed mcNuggets1 closed 8 years ago
It's a problem with that server.
How about just check if self.Alpha is a valid number in line 45. I get this Error on normal sandbox servers without modifications either.
It should always exist if there wasn't any modifications.
I've seen the error mentioned before (a couple of people have mentioned it in the Next Update thread) but I have no idea what causes it.
Yeah, and who the hell does modify the Alpha of an effect,?
@mcNuggets1 It's probably a bad addon that doesn't do it intentionally. If this were to happen on a vanilla Sandbox server, or you found something that unintentionally cleared an effect table or caused the Init not to run, THEN it would be an issue.
Sorry, but I got no addon which uses the effect or clearly modifies it.
I already stated, that this did happen to me in singleplayer one time without any addons at all.
Without any steps to replicate, there's not much that can be done
There is. Fixing the lua error by checking if alpha is a number.
Then we should just check if every variable is valid in the engine!
No, just things which Could error.
How could that error unless Init was overrided?
It's not a good idea to start adding excessive validity checks, the underlying issue must be fixed.
I dont have an explaination, just a Methode how to fix it.
by the Way I Found the course. it Happens on Using a Tool Gun, but I dont know More than that currently. Oh and that not everytine receives the error.
I spoke with someone else about this a few months ago. He said that it was caused by a memory leak in a weapon pack (FAS2) causing gmod to run out of memory or something. It's a common issue for players who've been on one of my servers for 5+ hours.
I don't have FAS2 subscribed and it still happens.
It was just an example. Might be something else on your end. But since it doesn't happen on all servers, something must be causing it.
Details
Lua error
[ERROR] gamemodes/sandbox/entities/effects/selection_ring.lua:45: attempt to compare nil with number
Steps to reproduce
You need to be on a multiplayer server, but exact steps to reproduce I can't give.