Posted 31 May 2015 - 08:03 PM
If I run some rom/ programs and call and look in _ENV afterwards there are some new values which should not be there.
VERSION:
1.75
DESCRIPTION:
Variables/Functions from some programs in the rom/ directory stay in _ENV after the program was called
EXPECTED RESULT:
I expected _ENV to be empty
REPRODUCTION STEPS:
shell.run("edit","something")
assert(_ENV.stringColour == nil, "This was not there before")
I made a list (using this program) of the places i found missing local statements:
Best thing: the doCommand function from adventure lets you continue to play after you died without any time-states passing by :D/>
VERSION:
1.75
DESCRIPTION:
Variables/Functions from some programs in the rom/ directory stay in _ENV after the program was called
EXPECTED RESULT:
I expected _ENV to be empty
REPRODUCTION STEPS:
shell.run("edit","something")
assert(_ENV.stringColour == nil, "This was not there before")
I made a list (using this program) of the places i found missing local statements:
adventure:610: attempt to create global function "doCommand" in the current environment
adventure:476: attempt to create global function "findItem" in the current environment
worm:20: attempt to create global function "printCentred" in the current environment
help:1: attempt to create global table "tArgs" in the current environment
monitor:2: attempt to create global function "printUsage" in the current environment
edit:31: attempt to create global number "stringColour" in the current environment
redirection:178: attempt to create global table "fLevel" in the current environment
I hope i did not miss anyBest thing: the doCommand function from adventure lets you continue to play after you died without any time-states passing by :D/>
Edited on 05 December 2015 - 03:20 PM