Hi, im making a custom function for E2 and in order to narrow down what the function finds i have included
if ent:GetClass() == "gmod_wire_expression2" then
however this returns the error (the line of code above is on line 16):
sv: Expression 2 (generic): entities/gmod_wire_expression2/core/custom/emp.lua:16: attempt to call method ‘GetClass’ (a nil value)
I have already performed checks to see if the entity is valid so i know thats not the problem, if anyone can help me solve this problem it will be greatly apreciated!