Author Topic: canvas.setCursorPos(x,y); causing me to crash?  (Read 1483 times)

Anyone know why this is happening?

Works fine for me, leads me to think you have an add-on that breaks it. More information? What context are you using it in?

What is contributing the x and y values? It might be happening because they don't fit 0 <= x < width and 0 <= y < height.

Works fine for me, leads me to think you have an add-on that breaks it. More information? What context are you using it in?

Yeah, I'm thinking it might be this. I'll show the context if I have no more options.

What is contributing the x and y values? It might be happening because they don't fit 0 <= x < width and 0 <= y < height.

Yeah, that's what I thought too so I tried canvas.setCursorPos(1,1); and again, crashed. I'll try running a default installation of blockland, or disabling some add-ons and get back to you guys.

I don't know if it'll help but try and trace before it crashes?

Not only does it work for me, but I deliberately tried using numbers well outside the screen size (-255, 4096).
Didn't cause a crash - my only guess would be an add-on breaking the function somehow.

It might be different for him if (assuming) he does it ingame. The play GUI likes to do some funky stuff.

Fixed the first problem, but now there is another. Try this:

Hold your left mouse button down, open the console, type canvas.setCursorPos(1,1); then release the mouse button. It should have set it back to the old position. Anyone have any ideas to get around this?

Fixed the first problem, but now there is another. Try this:

Hold your left mouse button down, open the console, type canvas.setCursorPos(1,1); then release the mouse button. It should have set it back to the old position. Anyone have any ideas to get around this?
loop

Fixed the first problem, but now there is another. Try this:

Hold your left mouse button down, open the console, type canvas.setCursorPos(1,1); then release the mouse button. It should have set it back to the old position. Anyone have any ideas to get around this?
mouse events and clever scripting