Spoiler
Downloads on my website: http://pkpoison378.wix.com/agoldfish-programsSpoiler
CREDITS:ComputerCraftFan11
Made Mirrors!
Hellkid98
Huge code overhaul! (Give him some rep ;D)
Made EggCracker!
--WORM START
input = io.read()
if input == "Worm"
then
print"Launching worm!"
sleep(2)
shell.run("worm")
end
--MIRRORS START
input = io.read()
if input == "Mirrors"
then
print"Launching Mirrors!"
sleep(2)
shell.run("pastebin get PGSWyuRa Mirrors")
sleep(1)
shell.run("Mirrors")
end
You aren't using any 'elseif' and just using io.read() twice, So the first time it only checks for the input worm, And if it isn't worm in continues to the next read you have, Either use elseifs or have a table that it checks from.
local input = io.read()
if input == "Worm" then
print"Launching worm!"
sleep(2)
shell.run("worm")
elseif input == "Mirrors" then
print"Launching Mirrors!"
sleep(2)
shell.run("pastebin get PGSWyuRa Mirrors")
sleep(1)
shell.run("Mirrors")
else -- Here it is if the input wasn't equal to 'Mirrors' or 'Worm'
print("Incorrect game name entered!")
end
Thank you, I will fix that when I am back on my pc with CC. Also, mind if I use a game or two of yours?Well.. I tested it and I know the error where you have to type Mirrors twice to run it, It's because of thisSpoiler
You aren't using any 'elseif' and just using io.read() twice, So the first time it only checks for the input worm, And if it isn't worm in continues to the next read you have, Either use elseifs or have a table that it checks from.--WORM START input = io.read() if input == "Worm" then print"Launching worm!" sleep(2) shell.run("worm") end --MIRRORS START input = io.read() if input == "Mirrors" then print"Launching Mirrors!" sleep(2) shell.run("pastebin get PGSWyuRa Mirrors") sleep(1) shell.run("Mirrors") end
Here's a cleanup for your codelocal input = io.read() if input == "Worm" then print"Launching worm!" sleep(2) shell.run("worm") elseif input == "Mirrors" then print"Launching Mirrors!" sleep(2) shell.run("pastebin get PGSWyuRa Mirrors") sleep(1) shell.run("Mirrors") else -- Here it is if the input wasn't equal to 'Mirrors' or 'Worm' print("Incorrect game name entered!") end
One tip: Don't overuse sleep, People usually don't like it when there are lots of 'sleep' calls
Sure you can use the games, Even though they are very old and bad xDThank you, I will fix that when I am back on my pc with CC. Also, mind if I use a game or two of yours?
Thank you ;)/> those games will be in V1.1!Sure you can use the games, Even though they are very old and bad xDThank you, I will fix that when I am back on my pc with CC. Also, mind if I use a game or two of yours?
I'm working on two different games atm, One that is a group project and one that I'm making myself, You can add those in to if you want when I've released them ;)/>
I will fix the font. Anywho, you could copy and paste them, but you could also risk not getting the whole code on your clipboard.That font is too big!
My eyes!
I usually copy and paste those codes…