This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
adencraft2000's profile picture

I Must Be Doing Something Wromg... But What?

Started by adencraft2000, 02 August 2013 - 03:14 PM
adencraft2000 #1
Posted 02 August 2013 - 05:14 PM
Hi, I have made a script installer that grabs multiple scrips from pastebin BUT it is ment to ask what ones I want with a yes/anything else answer thing but that is not working.

It works but does not wait for a responce before It installs it.

It can be found at http://pastebin.com/68JHikjS

Sorry for spelling I am 13 and stayed up all night trying to get it to funtion but >:(/>

All help is appreciated
HurricaneCoder #2
Posted 02 August 2013 - 05:59 PM
Hi, I have made a script installer that grabs multiple scrips from pastebin BUT it is ment to ask what ones I want with a yes/anything else answer thing but that is not working.

It works but does not wait for a responce before It installs it.

It can be found at http://pastebin.com/68JHikjS

Sorry for spelling I am 13 and stayed up all night trying to get it to funtion but > :(/>

All help is appreciated


You have to set input = read() then it will get what is type by the user.
Kingdaro #3
Posted 02 August 2013 - 06:30 PM
This line:
if input == yes then

and subsequent lines, put quotes around yes.
if input == "yes" then

Without quotes, it checks to see if the variable is equal to the variable yes, and not the value of "yes".
adencraft2000 #4
Posted 02 August 2013 - 07:02 PM
This line:
if input == yes then

and subsequent lines, put quotes around yes.
if input == "yes" then

Without quotes, it checks to see if the variable is equal to the variable yes, and not the value of "yes".

I realised that just then,
Thanks