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

On Demand Info

Started by kobkob1, 22 June 2015 - 07:03 PM
kobkob1 #1
Posted 22 June 2015 - 09:03 PM
So what I want to do is create a program that allows me to type into my computer, relay what I typed to be analysed by my computer to then be sent to a monitor(advanced) to display information

So I have started to work on time, and here is my work so far.
attachedMonitor = peripheral.wrap("right")
local input = read()
while true do
if input == ("time")then
attachedMonitor.write(os.time() )
else attachedMonitor.print("Uncomputed Command")
end

I try to run it and it shows up with a error message:
bios:367: [string "timeomd"]:10: end expected (to close 'while at line 3)
The other ideas I had were:
WorldDay
Cbc(Stands for change background colour) possibly with a string after it stating the colour
cts(change text scale)

Any help?
HPWebcamAble #2
Posted 23 June 2015 - 06:58 AM
The error you are getting is a really quick fix. The problem is just like the message says:

end expected (to close 'while at line 3)
It expects an 'end' to accompany the 'while' from line 3; You are just missing an 'end'


attachedMonitor = peripheral.wrap("right")
local input = read()
while true do
  if input == ("time")then
    attachedMonitor.write(os.time() )
  else
    attachedMonitor.print("Uncomputed Command")
  end
--#missing end goes here
When you indent correctly, the missing 'end' becomes obvious
kobkob1 #3
Posted 23 June 2015 - 08:03 AM
Thank you, I have only just started coding so my indents will not be perfect:)
Creator #4
Posted 23 June 2015 - 12:27 PM
So what I want to do is create a program that allows me to type into my computer, relay what I typed to be analysed by my computer to then be sent to a monitor(advanced) to display information

So I have started to work on time, and here is my work so far.
attachedMonitor = peripheral.wrap("right")
local input = read()
while true do
if input == ("time")then
attachedMonitor.write(os.time() )
else attachedMonitor.print("Uncomputed Command")
end

I try to run it and it shows up with a error message:
bios:367: [string "timeomd"]:10: end expected (to close 'while at line 3)
The other ideas I had were:
WorldDay
Cbc(Stands for change background colour) possibly with a string after it stating the colour
cts(change text scale)

Any help?

This kinda sounds like my abandoned project aware. However, you would need to send it to a site that will parse what you have written.