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

term.setCursorBlink not working correctly

Started by Exerro, 13 October 2012 - 09:13 AM
Exerro #1
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…
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
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
Anonomit #2
Posted 13 October 2012 - 03:43 PM
you should probably post the rest of your code. It makes it difficult to see what you're trying to do with only a snippet like this. It also makes it difficult to figure out what each variable is supposed to represent