mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add luacheck to check builtin (#7895)
This commit is contained in:
parent
8da35c22d1
commit
8e757859d6
24 changed files with 202 additions and 140 deletions
|
@ -117,7 +117,8 @@ end
|
|||
local function assert_can_be_called(func, func_name, level)
|
||||
if not can_be_called(func) then
|
||||
-- Then throw an *helpful* error, by pointing on our caller instead of us.
|
||||
error(format("Invalid argument to %s. Expected function-like type instead of '%s'.", func_name, type(func)), level + 1)
|
||||
error(format("Invalid argument to %s. Expected function-like type instead of '%s'.",
|
||||
func_name, type(func)), level + 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue