Posted 13 October 2012 - 11:13 AM
i have a bit of code in my word processor that im making and it doesnt seem to be working right…it displays it fine but when i use the arrow keys to move position the cursor stays at the end of the line. any ideas of what is wrong?
i use nLine as a y co-ord and nChar as an x co-ord
Spoiler
function drawScreen(number, clear)
if number == 1 then
drawBox(1,1,51,19)
drawBox(23,1,51,19)
drawBox(1,1,51,3)
if clear ~= true then
writePos(2,2,"BluePad version "..version.."")
writePos(string.len("BluePad version"..version)+3,3,"+")
term.setCursorPos(nLine+3,nChar+25)
term.setCursorBlink(true)
if #characters > 0 then
for k = 1,#characters do
for i = 1,25 do
if characters[k][i] ~= nil then
writePos(24+i,k+3,characters[k][i])
end
end
end
end
end
end
end
i use nLine as a y co-ord and nChar as an x co-ord