From 2540a8a1d2eaced45531618e2b5efb48eadbcbe4 Mon Sep 17 00:00:00 2001 From: Csoki Date: Sat, 26 Nov 2022 20:30:45 +0100 Subject: [PATCH] fix check functions --- [esx]/esx_identity/server/main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/[esx]/esx_identity/server/main.lua b/[esx]/esx_identity/server/main.lua index efca013f..2c80e517 100644 --- a/[esx]/esx_identity/server/main.lua +++ b/[esx]/esx_identity/server/main.lua @@ -99,11 +99,14 @@ local function checkDOBFormat(dob) end local function checkSexFormat(sex) + if not sex then + return false + end return sex == "m" or sex == "M" or sex == "f" or sex == "F" end local function checkHeightFormat(height) - local numHeight = tonumber(height) + local numHeight = tonumber(height) or 0 return numHeight >= Config.MinHeight and numHeight <= Config.MaxHeight end