General > Developers Corner
Lua Halo Glow Help
ChaosWolf:
[Macfan9000|7|STEAM_0:1:32363770] Lua Error:
[ERROR] lua/includes/extensions/util.lua:38: attempt to index local 'ply' (a nil
value)
1. GetPlayerTrace - lua/includes/extensions/util.lua:38
2. GetTraceProp - lua/autorun/cl_halo.lua:9
3. fn - lua/autorun/cl_halo.lua:18
4. Run - addons/ulib/lua/ulib/shared/hook.lua:183
5. fn - lua/includes/modules/halo.lua:163
6. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
server didn't like that either... this is where I am not understanding why its acting up.
Decicus:
As I said in my previous reply: "ply" is never defined (basically: doesn't exist) in your code. That is what "LocalPlayer()" is for, since the code is clientside, it will return the player object of the client.
Line 2 in the code should be
--- Code: ---local trace = util.TraceLine( util.GetPlayerTrace( LocalPlayer() ) )
--- End code ---
as Neku originally had the code.
ChaosWolf:
Okay So the errors are gone. But the halo still isn't highlighting props. In fact as apposed to my hook on its own. It doesn't highlight anything. The hook as a standalone will highlight everything. I need a happy medium. I would appreciate a revision of at all possible.
Target/aiming at a prop should make it glow the designated color. Perhaps there is a way to make it go
Do This and do that
ChaosWolf:
NOPE I TAKE THAT BACK
[ERROR] stack overflow
1. __mul - [C]:-1
2. GetPlayerTrace - lua/includes/extensions/util.lua:43
3. GetTraceProp - lua/autorun/cl_halo.lua:9
4. GetTraceProp - lua/autorun/cl_halo.lua:10
5. GetTraceProp - lua/autorun/cl_halo.lua:10
6. GetTraceProp - lua/autorun/cl_halo.lua:10
7. GetTraceProp - lua/autorun/cl_halo.lua:10
8. GetTraceProp - lua/autorun/cl_halo.lua:10
9. GetTraceProp - lua/autorun/cl_halo.lua:10
10. GetTraceProp - lua/autorun/cl_halo.lua:10
11. GetTraceProp - lua/autorun/cl_halo.lua:10
12. GetTraceProp - lua/autorun/cl_halo.lua:10
13. GetTraceProp - lua/autorun/cl_halo.lua:10
14. GetTraceProp - lua/autorun/cl_halo.lua:10
15. GetTraceProp - lua/autorun/cl_halo.lua:10
16. GetTraceProp - lua/autorun/cl_halo.lua:10
IM STILL GETTING A OVERFLOW OF ERRORS EVEN AFTER THE REVISION.
Neku:
Like I said, it's running much harder than intended.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version