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 --
4

1 回答 1

0

看来正确的名字是Add不是ADD。Lua 区分大小写。

于 2014-07-11T01:31:17.023 回答