Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Error when Loading Lambs only on Clients but not on the Server #331

Merged
merged 3 commits into from
Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions addons/main/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,30 @@ GVAR(shareHandlers) = [];

GVAR(blockSuppressionModelCache) = false call CBA_fnc_createNamespace;

if (isServer) then {
GVAR(versionLoadedOnServer) = QUOTE(VERSION_STR);
publicVariable QGVAR(versionLoadedOnServer);
} else {
0 spawn {
waitUntil {time > 0};
if (!isNil QGVAR(versionLoadedOnServer) && GVAR(versionLoadedOnServer) isEqualTo QUOTE(VERSION_STR)) exitWith {};
jokoho48 marked this conversation as resolved.
Show resolved Hide resolved
"LAMBS DANGER VERSION MISMATCH ERROR!!!!" hintC parseText format [
"Lambs Danger Version mismatch Error.<br/>Client Version: %1<br/>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)
];
while {true} do {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you sure you want to spam that every second?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

hintSilent _error;
systemChat _error;
diag_log text _error;
sleep 1;
};
};
};

ADDON = true;