Do you use final SVN revision?
I'm getting this when I try to use it. Error: [Scripted Entity Function] entities/gmod_wire_button/init.lua:19: Entity is NULL (If it was previously OK it has been deleted)
Wire User has never worked for me, but can't remember previous errors. Any ideas?
Do you use final SVN revision?
Did you try to do anything previously? I can think of some reasons why this happens.I'm getting this when I try to use it. Error: [Scripted Entity Function] entities/gmod_wire_button/init.lua:19: Entity is NULL (If it was previously OK it has been deleted)
Wire User has never worked for me, but can't remember previous errors. Any ideas?[/b]
The error comes from gmod_wire_button. I assume this is because the player given to the function Use of this button is NULL. Wire User has never been designed to work with default GMod and Wire buttons.
Edit : I found this in the wire user:
Why not just using this instead ?Code:trace.Entity:Fire("use","1",0)
Code:trace.Entity:Use(self.Entity:GetPlayer())
This worked perfectly, many thanks kilburnThe error comes from gmod_wire_button. I assume this is because the player given to the function Use of this button is NULL. Wire User has never been designed to work with default GMod and Wire buttons.
Edit : I found this in the wire user:
Why not just using this instead ?Code:trace.Entity:Fire("use","1",0)
[/b]Code:trace.Entity:Use(self.Entity:GetPlayer())![]()
Perfectly ? This may work even better.![]()
So, if you press someone else's non-wire button, it should simulate a keypress in his numpad, not yours. And it should also work with non-scripted buttons built in the map that don't have a Use function.Code:if trace.Entity.Use and trace.Entity.GetPlayer then ****trace.Entity:Use(trace.Entity:GetPlayer()) else ****trace.Entity:Fire("use","1",0) end
I'll put that in SVN in few moments
Bookmarks