From 3ed95557050d6ec69e97edf0fd1e9aaa1e10435c Mon Sep 17 00:00:00 2001 From: Van De Velde Date: Sun, 24 Jun 2018 20:47:41 +0200 Subject: [PATCH] Revert "Merge pull request #929 from Lugghawk/918_Fix_FindByName_Error_Flag" This reverts commit d6cdc098ceedcdb7df4b925e7bf2ae17643f1b29, reversing changes made to 6b04237a3fc8186be6322f713cf84e085a4001b6. --- Moose Development/Moose/Wrapper/Client.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Client.lua b/Moose Development/Moose/Wrapper/Client.lua index 4ca13c802..7df3c0586 100644 --- a/Moose Development/Moose/Wrapper/Client.lua +++ b/Moose Development/Moose/Wrapper/Client.lua @@ -74,7 +74,7 @@ CLIENT = { --- Finds a CLIENT from the _DATABASE using the relevant DCS Unit. -- @param #CLIENT self -- @param #string ClientName Name of the DCS **Unit** as defined within the Mission Editor. --- @param #boolean Error Flag indicating whether or not to throw an error if the CLIENT cannot be found. True by default. Returns `nil` if `Error` is false and no Client was found. +-- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client. -- @return #CLIENT -- @usage -- -- Create new Clients. @@ -94,7 +94,7 @@ function CLIENT:Find( DCSUnit, Error ) return ClientFound end - if Error or Error == nil then + if not Error then error( "CLIENT not found for: " .. ClientName ) end end @@ -105,7 +105,7 @@ end -- @param #CLIENT self -- @param #string ClientName Name of the DCS **Unit** as defined within the Mission Editor. -- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client. --- @param #boolean Error Flag indicating whether or not to throw an error if the CLIENT cannot be found. True by default. Returns `nil` if `Error` is false and no Client was found. +-- @param #boolean Error A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised. -- @return #CLIENT -- @usage -- -- Create new Clients. @@ -127,7 +127,7 @@ function CLIENT:FindByName( ClientName, ClientBriefing, Error ) return ClientFound end - if Error or Error == nil then + if not Error then error( "CLIENT not found for: " .. ClientName ) end end