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

Send errors to server without crashing client?

Started by bfbc2jb, 19 July 2013 - 08:05 PM
bfbc2jb #1
Posted 19 July 2013 - 10:05 PM
Title: Send errors to server without crashing client?

so ive set up a network between a pc and a turtle. the pc is the server and the turtle is the client. when i send a command from the server the turtle will execute it. the problem is if i send an invalid command then the client will just crash and will go offline, what i want is i want the turtle to, instead of crashing, to simply send the error to the server and the client to continue.
is there any way of doing this?
thank you in advance.
Lyqyd #2
Posted 20 July 2013 - 11:08 PM
Split into new topic.

Either put in some checks to verify that the command is acceptable, or pcall the part that executes the command. Handle exigencies appropriately.
bfbc2jb #3
Posted 21 July 2013 - 12:33 AM
Split into new topic.

Either put in some checks to verify that the command is acceptable, or pcall the part that executes the command. Handle exigences appropriately.

Ahh, didnt know about pcall. thanks, fixed it