ULX

Author Topic: Lua Halo Glow Help  (Read 13795 times)

0 Members and 1 Guest are viewing this topic.

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Lua Halo Glow Help
« Reply #15 on: August 30, 2014, 03:25:00 PM »
[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.
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Lua Halo Glow Help
« Reply #16 on: August 30, 2014, 05:24:53 PM »
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: [Select]
local trace = util.TraceLine( util.GetPlayerTrace( LocalPlayer() ) )as Neku originally had the code.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Lua Halo Glow Help
« Reply #17 on: August 30, 2014, 06:29:12 PM »
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
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Lua Halo Glow Help
« Reply #18 on: August 30, 2014, 11:22:19 PM »
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.
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Lua Halo Glow Help
« Reply #19 on: August 31, 2014, 02:46:04 AM »
Like I said, it's running much harder than intended.
Out of the Garry's Mod business.

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Lua Halo Glow Help
« Reply #20 on: August 31, 2014, 08:57:52 AM »
Yea I can see that, but how to fix it... That is the question. Even a revised version would be appreciated.
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

Offline ChaosWolf

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 2
  • "The Exiled One's" Server Owner
Re: Lua Halo Glow Help
« Reply #21 on: September 04, 2014, 11:47:07 AM »
so everyone just gave up on it?
"Someone once told me, scripting lua is like trying to build a rocket ship, once your finished with it and think your done, you start it up only to realize you had just built it upside down." ~Programmer

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given