some error handling
This commit is contained in:
parent
43777cc690
commit
564df7cd31
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user