0

When I bind the command to key it keeps telling me "Unknown command: TestJump". Here is what I do, I run the command in console "lua_openscript_cl TestJump" then I do "Bind e "TestJump," but that is where it starts to tell me that the command is unknow, it also tells me "Something is creating script errors" when I run the command to open the script, that's also when it gives me the error below.

Error:

[ERROR] lua/testjump.lua:11: attempt to call field 'ADD' (a nil value)
1. unknown - lua/testjump.lua:11

Code:

function TestJump()
    timer.simple(.7,jump) -- Jumps --
    timer.simple(.7, function() RunConsoleCommand("+jump") end)
    timer.simple(.72, function() RunConsoleCommand("-Jump") end)
end
-- Jumps --
function jump() -- Not sure if I'm even supposed to do this --
    LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles()-Angle(0,10,0))
end
-- ^ not sure what I am supposed to do with the EyeAngle --
concommand.ADD("Test",TestJump) -- Where I think the error is --
Yu Hao
  • 119,891
  • 44
  • 235
  • 294
WetCactus
  • 11
  • 1
  • 4

1 Answers1

0

It seems that the correct name is Add, not ADD. Lua is case-sensitive.

lhf
  • 70,581
  • 9
  • 108
  • 149