- Joined
- Jun 20, 2016
- Messages
- 45
- Reaction score
- 9
- First Language
- Singlish
- Primarily Uses
As an example, this is one of my code that counts every events within 3 tiles of the player.
Now the code doesn't matter, but what really annoys me that the game sometimes randomly throw this error:
Which is the reason I include "try { } catch(err) { }" in the code, so it will just proceed instead of crashing.
But this too, apply to all codes in the game. Sometime an error appear and I can't figure out why or where. So it is best to just ignore it (not the best option, I know).
But placing the "try { } catch(err) { }" line in every code in the game is tedious and not elegant.
So is there a line in the RMMV error handling that can be modified to ignore any errors and just proceed?
try { for (var i =1; i<300; i++)
{ if (Math.abs($gameMap.events().x - $gamePlayer.x) <= 3)
{ if (Math.abs($gameMap.events().y - $gamePlayer.y) <= 3)
{ $gameVariables.setValue(14, $gameVariables.value(14) + 1)
}}}} catch(err){}
Now the code doesn't matter, but what really annoys me that the game sometimes randomly throw this error:
Which is the reason I include "try { } catch(err) { }" in the code, so it will just proceed instead of crashing.
But this too, apply to all codes in the game. Sometime an error appear and I can't figure out why or where. So it is best to just ignore it (not the best option, I know).
But placing the "try { } catch(err) { }" line in every code in the game is tedious and not elegant.
So is there a line in the RMMV error handling that can be modified to ignore any errors and just proceed?
Last edited by a moderator:


