From e4e9f406ff393527edb02b03b3c20226bb90a337 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:57:44 -0500 Subject: [PATCH] Check to make sure game slot exists --- scripts/server/business.js | 5 +++++ scripts/server/house.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/scripts/server/business.js b/scripts/server/business.js index ebbdcaae..5b50bc80 100644 --- a/scripts/server/business.js +++ b/scripts/server/business.js @@ -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); diff --git a/scripts/server/house.js b/scripts/server/house.js index 44627b28..410f9377 100644 --- a/scripts/server/house.js +++ b/scripts/server/house.js @@ -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);