91 posts
Posted 05 August 2013 - 04:09 AM
Bios:337: [string "glass"]:59: 'end' expected to close 'while' at line 42) please help
Http://Pastebin.com/fKLqCY6k
236 posts
Posted 05 August 2013 - 04:19 AM
'end' expected
Read it, write an end to that line
91 posts
Posted 05 August 2013 - 04:26 AM
Problem is also it just repeats the one same command given please help
997 posts
Location
Wellington, New Zealand
Posted 05 August 2013 - 04:30 AM
Here's your code in "list of instructions" format - the problem should be obvious:
1. Wait for a command
2. Repeat the following step forever:
2a. Process the command
91 posts
Posted 05 August 2013 - 04:34 AM
Ok soo ik that so could you please help me I thought I could use repeat an then drop the while true and yet a button to trigger the until statement but it did not work
997 posts
Location
Wellington, New Zealand
Posted 05 August 2013 - 05:24 AM
How would you fix the list of instructions?
83 posts
Location
Behind you
Posted 05 August 2013 - 07:24 AM
You haven't ended the if on line 45.
It's your choice to decide which one you missed but either you missed the while or the if end. From the looks of your indents you missed the end on the if
12 posts
Posted 05 August 2013 - 09:01 AM
while true do
--test command
if (command == "shutdownMCM") then
reset()
print "running Shutdown command..."
glass.addText(10, 10, "System offline!", glcolors.red)
os.shutdown()
--screen reset
elseif (command == "reset") then
fullReset()
elseif
glass.addText(10, 10, "Unknown command!", glcolors.red) then
sleep(2)
fullReset()
end
end
should do the job.
It adds end to close the loop.
91 posts
Posted 10 August 2013 - 03:13 PM
It did it thank you :)/>