Change assignment to global in a function to warning

This commit is contained in:
rubenwardy 2015-02-04 10:18:16 +00:00 committed by Nils Dagsson Moskopp
parent a4bc5e525e
commit bd42a0c92e
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ function meta:__newindex(name, value)
info.currentline, name)
if not warned[warn_key] and info.what ~= "main" and
info.what ~= "C" then
minetest.log("error", ("Assignment to undeclared "..
warn(("Assignment to undeclared "..
"global %q inside a function at %s.")
:format(name, desc))
warned[warn_key] = true