24 posts
Location
England, Europe, Earth, Solar System, Milky Way, Local Cluster, Local Supercluster, Observable Universe, Universe, Local Multiverse... this could go on forever
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?
957 posts
Location
Web Development
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
24 posts
Location
England, Europe, Earth, Solar System, Milky Way, Local Cluster, Local Supercluster, Observable Universe, Universe, Local Multiverse... this could go on forever
Posted 23 June 2015 - 08:03 AM
Thank you, I have only just started coding so my indents will not be perfect:)
2679 posts
Location
You will never find me, muhahahahahaha
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.