166 posts
Location
Don't look behind you..
Posted 29 September 2012 - 02:07 PM
I get the above error when I run the program and when I use tonumber (probabily incorect) get expected ")" at line 8.
Thanks in andvance
PS: the pastebin URL/code
http://pastebin.com/zr1A6a9N remove the tonumber to see the error.
1604 posts
Posted 29 September 2012 - 08:36 PM
You didn't define x and t. You need to define them before using them.
Here's a modified version:
local tArgs = {...}
local printer = peripheral.wrap("left")
printer.newPage()
printer.setPageTitle(tArgs[1])
for y = 2, #tArgs do
printer.setCursorPos(1,y - 1)
printer.write(tArgs[y])
end
166 posts
Location
Don't look behind you..
Posted 30 September 2012 - 11:09 AM
thanks btw #tAgrs means number of arguments?
1604 posts
Posted 30 September 2012 - 03:27 PM
thanks btw #tAgrs means number of arguments?
Yes. # is the lenght operator in lua, it gets the lenght of strings or tables. tArgs is a table with the passed arguments, so it's lenght is the number of arguments.
166 posts
Location
Don't look behind you..
Posted 30 September 2012 - 05:49 PM
Thanks Master "Sensei" Lua.