From e17e2fb865fe78616b7bcb165e8c13de9e3b2686 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Tue, 23 Jan 2024 19:01:03 +0000 Subject: [PATCH] bit'o linting --- functions.lua | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/functions.lua b/functions.lua index d7700aa..90fea12 100644 --- a/functions.lua +++ b/functions.lua @@ -193,22 +193,12 @@ end function ensureNetToVeh(vehNetID) if Config.System.Debug then print("^6Bridge^7: ^3ensureNetToVeh^7: ^2Requesting NetworkDoesNetworkIdExist^7(^6"..vehNetID.."^7)") end local timeout = 100 - while not NetworkDoesNetworkIdExist(vehNetID) and timeout > 0 do - timeout -= 1 - Wait(10) - end - if not NetworkDoesNetworkIdExist(vehNetID) then - return 0 - end + while not NetworkDoesNetworkIdExist(vehNetID) and timeout > 0 do timeout -= 1 Wait(10) end + if not NetworkDoesNetworkIdExist(vehNetID) then return 0 end timeout = 100 local vehicle = NetToVeh(vehNetID) - while not DoesEntityExist(vehicle) and vehicle ~= 0 and timeout > 0 do - timeout -= 1 - Wait(10) - end - if not DoesEntityExist(vehicle) then - return 0 - end + while not DoesEntityExist(vehicle) and vehicle ~= 0 and timeout > 0 do timeout -= 1 Wait(10) end + if not DoesEntityExist(vehicle) then return 0 end return vehicle end