Make `options` local here.
authorAuke Kok <sofar@foo-projects.org>
Wed, 23 Mar 2016 04:59:23 +0000 (21:59 -0700)
committerest31 <MTest31@outlook.com>
Thu, 24 Mar 2016 15:52:26 +0000 (16:52 +0100)
Undoubtably this may cause problems later if unchecked.

```
2016-03-22 21:57:52: WARNING[Server]: Assignment to undeclared global "options" inside a function at .../sofar/git/minetest/bin/../builtin/game/chatcommands.lua:862.
```

builtin/game/chatcommands.lua

index 0b197664081bae00a22916eb40c88be1f3c81482..4deff281dd5f53f8001f38c3e89a9f66884eb3b4 100644 (file)
@@ -859,7 +859,7 @@ core.register_chatcommand("clearobjects", {
        description = "clear all objects in world",
        privs = {server=true},
        func = function(name, param)
-               options = {}
+               local options = {}
                if param == "" or param == "full" then
                        options.mode = "full"
                elseif param == "quick" then