当我将命令绑定到键时,它总是告诉我"Unknown command: TestJump“。下面是我所做的,我在控制台"lua_openscript_cl TestJump“中运行命令,然后执行"Bind e "TestJump,但这就是它开始告诉我这个命令不知道的地方,它还告诉我,当我运行命令来打开脚本时,”有些东西正在创建脚本错误“,也就是当它给我下面的错误时。
错误:
错误lua/testjump.lua:11:尝试调用字段'ADD‘(一个零值) 1.未知- lua/testjump.lua:11
代码:
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 --发布于 2014-07-11 01:31:17
看起来的正确名称是Add,而不是ADD。卢阿对大小写很敏感。
https://stackoverflow.com/questions/24685944
复制相似问题