List keeps repeating...?

id: 299612

category: Help with Scripts

posts: 5

WFS_Ultra WFS_Ultra loading
Link to project
(By the way to get in you have to first type ‘admin’)

Hi, I'm making a basic OS shell and when I typed it in ‘help’ it showed the command list, but repeated twice. When I restarted the project (clicked the green flag) and typed in ‘help’ again it repeated 1 or 2 more times. And it goes on and on. Does anyone know why this is happening? I didn't add new items to the list or anything so where did it come from?

WFS_Ultra wrote:

Link to project
(By the way to get in you have to first type ‘admin’)

Hi, I'm making a basic OS shell and when I typed it in ‘help’ it showed the command list, but repeated twice. When I restarted the project (clicked the green flag) and typed in ‘help’ again it repeated 1 or 2 more times. And it goes on and on. Does anyone know why this is happening? I didn't add new items to the list or anything so where did it come from?
Hi! Your list containing the commands has a repeat in it. Your code prints that, so if you change the list to just one item per command, it should work.
deck26 deck26 loading
You never clear the list cmd but you add all the commands when you start the project so you keep adding extra copies.
hello, I have a question. I'm working on a project on scratch, and I'm using a lot of lists. Do the lists clear themselves every time the project is opend by another user? (the project's shared)
deck26 deck26 loading

ThunderMustang00900 wrote:

hello, I have a question. I'm working on a project on scratch, and I'm using a lot of lists. Do the lists clear themselves every time the project is opend by another user? (the project's shared)
Lists are stored in the project according to their state last time you saved the project. That is what anyone will see when they open the project.

Next time you need help please post a new topic rather than necroposting.