From ce82271fdb4040a9750b6525c85a481e44483e5b Mon Sep 17 00:00:00 2001 From: jokoho482 Date: Tue, 9 Jul 2024 19:09:30 +0200 Subject: [PATCH] Extend Error Message for when the Mod is not loaded on the Server --- addons/main/XEH_preInit.sqf | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/addons/main/XEH_preInit.sqf b/addons/main/XEH_preInit.sqf index 205587a1..1d7e3be6 100644 --- a/addons/main/XEH_preInit.sqf +++ b/addons/main/XEH_preInit.sqf @@ -18,16 +18,25 @@ if (isServer) then { 0 spawn { waitUntil {time > 0}; if (!isNil QGVAR(versionLoadedOnServer) && {GVAR(versionLoadedOnServer) isEqualTo QUOTE(VERSION_STR)}) exitWith {}; - "LAMBS DANGER VERSION MISMATCH ERROR!!!!" hintC parseText format [ - "Lambs Danger Version mismatch Error.
Client Version: %1
Server Version: %2", - QUOTE(VERSION_STR), - GVAR(versionLoadedOnServer) - ]; - private _error = format [ - "Lambs Danger Version mismatch Error. Client Version: %1 Server Version: %2", - QUOTE(VERSION_STR), - GVAR(versionLoadedOnServer) - ]; + + private _error = if (isNil QGVAR(versionloadedonServer)) then { + "LAMBS DANGER NOT LOADED ON SERVER!" hintC parsetext format [ + "Lambs Danger is not loaded on server but on Client!" + ]; + "Lambs Danger is not loaded on server but on Client!" + } else { + "LAMBS DANGER VERSION MISMATCH ERROR!!!!" hintC parsetext format [ + "Lambs Danger Version mismatch Error.
Client Version: %1
Server Version: %2", + QUOTE(VERSION_str), + GVAR(versionloadedonServer) + ]; + format [ + "Lambs Danger Version mismatch Error. Client Version: %1 Server Version: %2", + QUOTE(VERSION_str), + GVAR(versionloadedonServer) + ]; + }; + while {true} do { hintSilent _error; systemChat _error;