-2

I'm just asking a question on finding error details from the error function.

Like I would like to find error details from example.lua:50: "then" expected near "if".

Any ways on how to do that on Lua? I'm working on something for ComputerCraft on Lua. (Minecraft Java mod)

EDIT:

I'm trying make a function that returns the error parsed out. It's supposed to return 3 variables, var1: file name, var2: line number (if none it is specified nil), var3: error text.

1 Answers1

1

example.lua is the file where the error is. 50 is the line number. There is a syntax error, likely in the if condition. (I'm not familiar with ComputerCraft, so I don't know where that file might be.)

luther
  • 5,195
  • 1
  • 14
  • 24