diff --git a/cScripts/functions/init/fn_init_eventHandlers.sqf b/cScripts/functions/init/fn_init_eventHandlers.sqf index ce28c23fa..72f93e602 100644 --- a/cScripts/functions/init/fn_init_eventHandlers.sqf +++ b/cScripts/functions/init/fn_init_eventHandlers.sqf @@ -43,7 +43,7 @@ INFO("InitEventHandlers","Creating Server EventHandlers"); params ["_guid","_name"]; private _unit = [_guid] call BIS_fnc_getUnitByUID; private _playerLog = GETMVAR(EGVAR(log,players),createHashMap); - INFO_3("PlayerLog","Connected %1 [%2] (GUID: %3)",_name,typeOf _unit,_guid); + INFO_3("PlayerLog","Connected %1 [%2] (GUID: %3)",_name,_unit,_guid); if (!isNil{_playerLog get _guid}) then { INFO_1("PlayerLog","Updating Log Entry [%1]", isNil{_playerLog get _guid}); @@ -53,8 +53,8 @@ INFO("InitEventHandlers","Creating Server EventHandlers"); _connections pushBack systemTimeUTC; _data set ["connections", _connections]; - private _loadout = GETVAR(EGVAR(Gear,LoadoutClass), typeOf _unit); - _data set ["loadout", GETVAR(EGVAR(Gear,LoadoutClass), typeOf _unit)]; + private _loadout = if (isNull _unit) then {"Trooper"} else {GETVAR(_unit,EGVAR(Gear,LoadoutClass), typeOf _unit)}; + _data set ["loadout", _loadout]; _playerLog set [_guid,_data]; } else {