my script so far:
Code: Select all
time = 1
function pitSequence()
local sequence = { pitpuz7, pitpuz4, pitpuz1, pitpuz2, pitpuz3, pitpuz6, pitpuz5, pitpuz8, pitpuz9 } --this doesn't contain ALL the pits, only the exact sequence or the path of closing and opening pits
sequence[time]:close() --close a pit in the sequence
-- sequence[time-3]:open() --and then open a pit again a few steps behind
time = time + 1
end
1 2 3
4 5 6
7 8 9 z
x
so I have them closing 7 4 1, 2 3, 6 5, 8 9, so I can move from x to z
Anyway, without any method yet to shut down the timer, soon after 9 closed, I got a crash, and my mouse was stuck to the middle of the screen, even if I alt=tabbed to other windows open! I had to use keyboard shortcuts to close the editor, then my mouse was free again!
But I feel a little sense of déjà vu - is this already a known bug, that when using mouselook and you get a crash then the mouse is stuck near the screen center? I didn't see it on the "known issues" list for 1.2.11.
The error is:
sequence[time]:close() --close a pit in the sequence - "attempt to index a nil value" and it's right when the next timer tick happens after closing the last pit