Jump to content




[1.75][SMP/SSP] rom-program functions in _ENV


  • This topic is locked This topic is locked
6 replies to this topic

#1 Lion4ever

  • Members
  • 91 posts

Posted 31 May 2015 - 07: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:

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 any

Best thing: the doCommand function from adventure lets you continue to play after you died without any time-states passing by :D

Edited by Lion4ever, 05 December 2015 - 04:20 PM.


#2 Lion4ever

  • Members
  • 91 posts

Posted 28 June 2015 - 12:17 AM

Now for 1.74

#3 Lion4ever

  • Members
  • 91 posts

Posted 05 December 2015 - 04:20 PM

Now for 1.75

#4 apemanzilla

  • Members
  • 1,421 posts

Posted 10 December 2015 - 11:26 PM

Haven't actually tested it but looking through the rom for 1.76pr2 it seems that this is still present.

#5 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 10 December 2015 - 11:49 PM

I completly forgot about this bug. I will repost this list on github.

Edit: Link : https://github.com/d...Craft/issues/30

Edited by Wojbie, 11 December 2015 - 12:27 AM.


#6 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 11 December 2015 - 12:15 AM

Having a link to the github issue in each bug thread (assuming the bug can still be reproduced under 1.76beta), or at least a thread bump if the bug can't be reproduced any more, would make it a lot easier for other people running through this section to see which threads they can ignore.

#7 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 11 December 2015 - 01:04 AM

View PostBomb Bloke, on 11 December 2015 - 12:15 AM, said:

Having a link to the github issue in each bug thread (assuming the bug can still be reproduced under 1.76beta), or at least a thread bump if the bug can't be reproduced any more, would make it a lot easier for other people running through this section to see which threads they can ignore.
Posted Image





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users