mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-17 14:55:13 -05:00
Change assignment to global in a function to warning
This commit is contained in:
parent
1b4aaa5f50
commit
b56f1175a2
@ -22,7 +22,7 @@ function meta:__newindex(name, value)
|
|||||||
info.currentline, name)
|
info.currentline, name)
|
||||||
if not warned[warn_key] and info.what ~= "main" and
|
if not warned[warn_key] and info.what ~= "main" and
|
||||||
info.what ~= "C" then
|
info.what ~= "C" then
|
||||||
minetest.log("error", ("Assignment to undeclared "..
|
warn(("Assignment to undeclared "..
|
||||||
"global %q inside a function at %s.")
|
"global %q inside a function at %s.")
|
||||||
:format(name, desc))
|
:format(name, desc))
|
||||||
warned[warn_key] = true
|
warned[warn_key] = true
|
||||||
|
Loading…
Reference in New Issue
Block a user