1
0
mirror of synced 2024-11-12 01:10:47 +01:00

some error handling

This commit is contained in:
Shiroi Kitsu 2023-01-18 14:27:00 +07:00
parent 43777cc690
commit 564df7cd31

View File

@ -424,6 +424,12 @@ export default class CarModule extends Module {
regionId = MersenneTwister.int(1, 47); regionId = MersenneTwister.int(1, 47);
} }
// Error handling if regionId is below 1
if(regionId < 1)
{
regionId = MersenneTwister.int(1, 47);
}
// Error handling if regionId is above 47 // Error handling if regionId is above 47
if(regionId > 47) if(regionId > 47)
{ {