General > Developers Corner
ULX blocking my script?
(1/1)
Neoon:
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 );
--- End quote ---
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
--- End quote ---
Any idea? http://facepunch.com/showthread.php?t=1367997 I hope you can help me here more...
Megiddo:
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.
Neoon:
Wait, "skybox" is a string not a number.
Eccid:
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?
Neku:
Perhaps it is your pmdg files.
Navigation
[0] Message Index
Go to full version