Posted 11 July 2014 - 09:05 PM
This is a very simple piece of code, but I can't figure out why it doesn't work.
It doesn't interact with anything else in the code, so I don't think it's necessary to put the rest of the code in this topic.
This piece of code is supposed to write a full line of spaces to color the line.
It gives me this error : 40: '<name>' expected
I'm sure the answer is very simple, but I can't figure out what goes wrong.
Also srcWidth is not defined anywhere else in the code.
Thank you for helping.
Edit : Just realized my very stupid mistake. A moderator can delete this topic as it is pretty much useless to anyone that knows Lua.
It doesn't interact with anything else in the code, so I don't think it's necessary to put the rest of the code in this topic.
39 local srcWidth = term.getSize()
40 for 1,srcWidth do
41 io.write(" ")
42 end
This piece of code is supposed to write a full line of spaces to color the line.
It gives me this error : 40: '<name>' expected
I'm sure the answer is very simple, but I can't figure out what goes wrong.
Also srcWidth is not defined anywhere else in the code.
Thank you for helping.
Edit : Just realized my very stupid mistake. A moderator can delete this topic as it is pretty much useless to anyone that knows Lua.
Edited on 11 July 2014 - 07:10 PM