From 18df0817b18c8a48564c0eae31e147cb7845957b Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Fri, 2 May 2025 22:22:47 +0100 Subject: [PATCH] Make version checks a bit more obvious Adds more obvious prints if the current version is outdated (and also repeats it every 20 minutes) --- _versioncheck.lua | 7 +++++++ shared/_scriptversioncheck.lua | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/_versioncheck.lua b/_versioncheck.lua index 4a05452..5dc6472 100644 --- a/_versioncheck.lua +++ b/_versioncheck.lua @@ -35,7 +35,14 @@ function CheckBridgeVersion() if compareResult == 0 then print("^7'^3jim_bridge^7' - ^2You are running the latest version^7. ^7(^3"..currentVersionRaw.."^7)") elseif compareResult < 0 then + -- Made the check a bit more obvious + print("^1----------------------------------------------------------------------^7") print("^7'^3jim_bridge^7' - ^1You are running an outdated version^7! ^7(^3"..currentVersionRaw.."^7 → ^3"..newestVersionRaw.."^7)") + print("^1----------------------------------------------------------------------^7") + SetTimeout(1200000, function() + -- Do a naughty repeat message every 20 minutes until the the script is updated + CheckBridgeVersion() + end) else print("^7'^3jim_bridge^7' - ^5You are running a newer version ^7(^3"..currentVersionRaw.."^7 ← ^3"..newestVersionRaw.."^7)") end diff --git a/shared/_scriptversioncheck.lua b/shared/_scriptversioncheck.lua index 5105767..3f6cfa7 100644 --- a/shared/_scriptversioncheck.lua +++ b/shared/_scriptversioncheck.lua @@ -51,7 +51,13 @@ function CheckVersion() if compareResult == 0 then print("^7'^3"..script.."^7' - ^2You are running the latest version^7. (^3"..currentVersionRaw.."^7)") elseif compareResult < 0 then + print("^1----------------------------------------------------------------------^7") print("^7'^3"..script.."^7' - ^1You are currently running an outdated version^7! (^3"..currentVersionRaw.."^7 → ^3"..fallbackVersionRaw.."^7)") + print("^1----------------------------------------------------------------------^7") + SetTimeout(1200000, function() + -- Do a naughty repeat message every 20 minutes until the the script is updated + CheckVersion() + end) else print("^7'^3"..script.."^7' - ^5You are running a newer version ^7(^3"..currentVersionRaw.."^7 ← ^3"..fallbackVersionRaw.."^7)") end @@ -63,7 +69,13 @@ function CheckVersion() if compareResult == 0 then print("^7'^3"..script.."^7' - ^2You are running the latest version^7. (^3"..currentVersionRaw.."^7)") elseif compareResult < 0 then + print("^1----------------------------------------------------------------------^7") print("^7'^3"..script.."^7' - ^1You are currently running an outdated version^7! (^3"..currentVersionRaw.."^7 → ^3"..newestVersionRaw.."^7)") + print("^1----------------------------------------------------------------------^7") + SetTimeout(1200000, function() + -- Do a naughty repeat message every 20 minutes until the the script is updated + CheckVersion() + end) else print("^7'^3"..script.."^7' - ^5You are running a newer version ^7(^3"..currentVersionRaw.."^7 ← ^3"..newestVersionRaw.."^7)") end