From 30f1827509ed764adde834380e21cc6b8c42e9b6 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sat, 31 Dec 2016 18:20:49 -0500 Subject: [PATCH] Prevent 'name' error when player is killed while logging in Prevents WARNING: Function 'name' - x is dead when player is killed while logging in. --- SQF/dayz_code/system/player_monitor.fsm | 5 +++-- SQF/dayz_code/system/progress_monitor.sqf | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index ffee10f2a..3d611c4cd 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -1942,12 +1942,13 @@ class FSM itemno = 106; init = /*%FSM*/"if (_debug == 1) then {diag_log [diag_tickTime,'Finish'];};" \n "" \n - "PVDZ_plr_LoginRecord = [_playerUID,_charID,0,toArray (name vehicle player)];" \n + "dayz_playerName = if (alive player) then {name player} else {'unknown'};" \n + "PVDZ_plr_LoginRecord = [_playerUID,_charID,0,toArray dayz_playerName];" \n "" \n "" \n "progressLoadingScreen 1;" \n "" \n - "diag_log format ['Sent to server PVDZ_plr_LoginRecord: [%1, %2, %3, %4]',_playerUID,_charID,0,(name vehicle player)]; " \n + "diag_log format ['Sent to server PVDZ_plr_LoginRecord: [%1, %2, %3, %4]',_playerUID,_charID,0,dayz_playerName]; " \n "" \n "_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n "_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n diff --git a/SQF/dayz_code/system/progress_monitor.sqf b/SQF/dayz_code/system/progress_monitor.sqf index da0ae25b3..8a0cc42b1 100644 --- a/SQF/dayz_code/system/progress_monitor.sqf +++ b/SQF/dayz_code/system/progress_monitor.sqf @@ -11,7 +11,6 @@ while {true} do { }; if ((!isNil "Dayz_loginCompleted") and {(Dayz_loginCompleted)}) exitWith { //diag_log [ __FILE__, __LINE__, "End loop"]; - dayz_playerName = if (alive player) then {name player} else {"unknown"}; if (dayz_groupSystem) then {execVM "\z\addons\dayz_code\groups\init.sqf";}; }; _display = uiNameSpace getVariable "BIS_loadingScreen";