ULX

Author Topic: ULX blocking my script?  (Read 2383 times)

0 Members and 1 Guest are viewing this topic.

Offline Neoon

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
ULX blocking my script?
« on: February 22, 2014, 01:36:37 PM »
HI there :D

I just create a little teleport script and seems like ULX is blocking/removing the hook?

Quote
local comodo_spawn_pos = Vector(-944.464111, -196.986008, -15775.968750)

local function skybox( ply, text, public )
   if (string.sub(text, 1, 6) == "/skybox") then
      ply:SetPos(comodo_spawn_pos)
      return ""
   end
end
hook.Add( "PlayerSay", "skybox", skybox );

Thats what i get:

Quote
22:35:49 Running script autorun/teleport.lua...
         Loading Teleport script
         TEST [lua/autorun/lordi_anti_propkill.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/m9k_assault_rifles.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/m9k_heavy_weaps.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/m9k_small_arm_weapons.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/m9k_specialties.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/pdmg_client.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/pdmg_convars.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/pdmg_exclusions.lua][lua/autorun/teleport.lua]
         TEST [lua/autorun/pdmg_server.lua][lua/autorun/teleport.lua]
         
         [ERROR] lua/includes/util.lua:184: attempt to index local 'object' (a number value)
           1. IsValid - lua/includes/util.lua:184
            2. sortHooks - addons/ulib/lua/ulib/shared/hook.lua:47
             3. Add - addons/ulib/lua/ulib/shared/hook.lua:105
              4. unknown - lua/autorun/teleport.lua:10
         

Any idea? http://facepunch.com/showthread.php?t=1367997 I hope you can help me here more...

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX blocking my script?
« Reply #1 on: February 22, 2014, 07:27:19 PM »
Odd. It's saying that the hook name (which should be a string) is a number. Though, the ULib hook library is built to be the same as Garry's, so you'd have the same issue without ULib.
Experiencing God's grace one day at a time.

Offline Neoon

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: ULX blocking my script?
« Reply #2 on: February 23, 2014, 02:34:30 AM »
Wait, "skybox" is a string not a number.

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: ULX blocking my script?
« Reply #3 on: February 23, 2014, 09:30:39 AM »
Is this part of a bigger file? It says "unknown - lua/autorun/teleport.lua:10" but there's only 9 lines. Also, what map is this on?

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: ULX blocking my script?
« Reply #4 on: February 23, 2014, 09:49:52 AM »
Perhaps it is your pmdg files.
Out of the Garry's Mod business.