Check to make sure game slot exists

This commit is contained in:
Vortrex
2022-04-25 14:57:44 -05:00
parent 43f9aff82e
commit e4e9f406ff
2 changed files with 10 additions and 0 deletions

View File

@@ -840,6 +840,11 @@ function setBusinessInteriorTypeCommand(command, params, client) {
return false;
}
if(typeof getGameData().interiors[getGame()] == "undefined") {
messagePlayerError(client, `There are no interiors available for this game!`);
return false;
}
if(isNaN(typeParam)) {
if(toLowerCase(typeParam) == "None") {
getBusinessData(businessId).exitPosition = toVector3(0.0, 0.0, 0.0);

View File

@@ -343,6 +343,11 @@ function setHouseInteriorTypeCommand(command, params, client) {
return false;
}
if(typeof getGameData().interiors[getGame()] == "undefined") {
messagePlayerError(client, `There are no interiors available for this game!`);
return false;
}
if(isNaN(typeParam)) {
let tempHouseLocation = new HouseLocationData(false);