This way you can easily find if and where a table is modified. (e.g. to prevent something like os.pullEvent = nil)
By default this program blocks the enviorment it was started in ( getfenv() ). This way you can tell if you forgot a "local"-statement in your code because if you did, it rises an error.
variable = "value" -- yourprogram:1: attempt to create global string "variable" in the current environment local variable = "value" -- works fine
Using local for variables that are used only by your program is not only slightly faster but considered a better coding-style as well.
Program: pastebin get YqyTgCLy checkLocal
Usage: checkLocal [optional name of program to test]
Edited by Lion4ever, 31 May 2015 - 06:40 PM.












