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 environmentI hope i did not miss any
Best thing: the doCommand function from adventure lets you continue to play after you died without any time-states passing by
Edited by Lion4ever, 05 December 2015 - 04:20 PM.


This topic is locked











