There is a very rare situation in my game under construction which I have not yet been able to identify the origin, since repeating the same steps a second time the error does not occur.
But I was able to identify a line, where if a value is missing, it will generate errors later on.
To avoid this, I inserted the error
instruction with the warning about this missing value:
function Ang(Angle)
if Angle == -180 then
Angle = 180
else
error("Invalid Angle: ", Angle)
end
end
The problem is that error
aborts the script, thus interrupting the entire game.
My question is, should I use the error
command? Because once my game is lauched, it will stop the game, creating the worst scenario for the players…