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

Why won't this work?

Started by Zecradox, 12 April 2018 - 01:06 PM
Zecradox #1
Posted 12 April 2018 - 03:06 PM
masterwindow = window.create(term.current(),0,0,20,10)
masterwindow.setBackgroundColor(colors.white)
masterwindow.clear()
titlewindow = window.create(masterwindow,0,0,20,1)
titlewindow.setBackgroundColor(colors.gray)
titlewindow.clear()
titlewindow.setTextColor(colors.red)
titlewindow.setCursorPos(2,1)
titlewindow.write('TESTING')
Edited on 12 April 2018 - 01:07 PM
SquidDev #2
Posted 12 April 2018 - 03:16 PM
Terminals start at 1,1 instead of 0,0, so you need to construct the windows using 1,1 instead.
Sewbacca #3
Posted 17 April 2018 - 02:09 PM
Lua in generel and ComputerCraft are using the 1 index for the first index, not the 0, like in common languages (e. g. Java, C#, C++, JavaScript)