From 91e3099f0eb63049d3d67b4617e474614ea87794 Mon Sep 17 00:00:00 2001 From: MrFastwind Date: Thu, 2 Jul 2026 04:08:00 +0200 Subject: [PATCH] fix(kp-framework): Fixes spam in logs of "Error Undefined variable in expression: _grp" in \scripts\server\patrols\manage_one_patrol.sqf..., line 62 --- src/scripts/server/patrols/manage_one_patrol.sqf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scripts/server/patrols/manage_one_patrol.sqf b/src/scripts/server/patrols/manage_one_patrol.sqf index 62c7f72..10c48ac 100644 --- a/src/scripts/server/patrols/manage_one_patrol.sqf +++ b/src/scripts/server/patrols/manage_one_patrol.sqf @@ -1,5 +1,5 @@ params [ "_minimum_readiness", "_is_infantry" ]; -private [ "_headless_client" ]; +private [ "_headless_client", "_grp", "_spawn_marker", "_sector_spawn_pos", "_started_time", "_patrol_continue" ]; waitUntil { !isNil "blufor_sectors" }; waitUntil { !isNil "combat_readiness" }; @@ -58,6 +58,11 @@ while { GRLIB_endgame == 0 } do { }; while { _patrol_continue } do { + if (isNil "_grp") then { + _patrol_continue = false; + ["_grp was nil, but patrol was expected", "MANAGE_ONE_PATROL"] call KPLIB_fnc_log; + break; + }; sleep 60; if ( count (units _grp) == 0 ) then { _patrol_continue = false; -- 2.54.0