Is there an easy way to implement a try/error catch? It’s needed to avoid problems with multiple collisions (instead of receiving errors I could just call a function to handle the error)
In languages like python it would be
try:
my function here
except:
print(“error!”)
and since lua is close to python I figured it’d have something like this.
Help would be appreciated, thanks! [import]uid: 9033 topic_id: 4426 reply_id: 304426[/import]
whoops, nevermind! I already found the solution. For anyone else wondering, just put this: if unexpected_condition then print(“error!”) end before any blocks that may contain an error (or just inside a function)
you can obviously change the print to whatever you want. [import]uid: 9033 topic_id: 4426 reply_id: 13795[/import]