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

Destroying a computer.

Started by mrpoopy345, 22 January 2014 - 02:12 PM
mrpoopy345 #1
Posted 22 January 2014 - 03:12 PM
Hello! I found a bug. A way to destroy a computer so it can never be used again, that should not work.
I found it while trying to receive messages while the user interacts with a shell, but completely ruined my computer to the point of no return.
In your startup file:

function os.pullEvent(str)
 if str == "modem_message" then
  --Some code you don't need to see here
end
On startup, it will wait about 4 seconds, print a java error, say press any key to continue, and you can't press any key to continue.
Why is this a bug? Well, I found a way to disable ctrl+s and crtl+r, which are hard coded.
Feedback?
CometWolf #2
Posted 22 January 2014 - 03:20 PM
Ctrl+t is not hard coded, it's part of the function you redefined. and ctrl+s will not work when the computer shutsdown, which your redef of pullEvent has made it do. Make a startup on a disk with just return on it and place it in a drive by the comp.
Lyqyd #3
Posted 22 January 2014 - 04:57 PM
Ctrl-T is coded on the Java side to throw a "terminate" event. Whether that's "hard coded" or not depends on whatever your criteria are. This isn't a bug, you're just doing it wrong. Post your code to Ask a Pro.

Locked.