MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.59k stars 431 forks source link

Editor Crashing Once clicking on somewhere #3499

Closed nostopgmaming17 closed 2 years ago

nostopgmaming17 commented 2 years ago

computer.pullSignal() returns float x and y on the click events

/bin/edit.lua:252: bad argument #2 to 'format' (number has no integer representation) stack traceback: [C]: in function 'string.format' /bin/edit.lua:252: in upvalue setCursor /bin/edit.lua:655: in local 'onClick' /bin/edit.lua:708: in main chunk (...tail calls...) [C]: in functipn 'xpcall' machine:799: n global 'xpcall' /lib/process.lua:63: in function </lib/process.lua:59> h

vberezinbadger commented 2 years ago

Try copying the editor from a standard OpenOS floppy. Otherwise, you will have to reinstall the system.

nostopgmaming17 commented 2 years ago

Try copying the editor from a standard OpenOS floppy. Otherwise, you will have to reinstall the system.

I knew it wouldn't work since I used openos editor tried it and obviously didn't work

Ocawesome101 commented 2 years ago

component.screen.setPrecise(false) might fix it.

payonel commented 2 years ago

i decided to floor the values passed to setCursor in edit. This could have been fixed in the tty layer but that code is so heavily reused that it is hard to measure the impact at this point.