I've noticed that, on random occasions, the player object in the array that is passed to "initPlayerServer.sqf" is null. I've looked into the game files, and I've traced down the issue.
The problem originates from "initFunctions.sqf" in "functions_f.pbo". At line 593, it does the following:
<pre>if !(isDedicated) then {
[player,_didJIP] execvm "initPlayerLocal.sqf";
[[[player,_didJIP],"initPlayerServer.sqf"],"bis_fnc_execvm",false,false] call bis_fnc_mp;
"initPlayerLocal.sqf" call bis_fnc_logFormat;
"initPlayerServer.sqf" call bis_fnc_logFormat;
};</pre>
However, the problem here is that the script does not wait until the player object is not null. It usually takes a couple seconds early game until it is set by the engine. So, the fix is simply to add a "waitUntil {!isNull player}":
<pre>if !(isDedicated) then {
<b>waitUntil {!isNull player};</b>
[player,_didJIP] execvm "initPlayerLocal.sqf";
[[[player,_didJIP],"initPlayerServer.sqf"],"bis_fnc_execvm",false,false] call bis_fnc_mp;
"initPlayerLocal.sqf" call bis_fnc_logFormat;
"initPlayerServer.sqf" call bis_fnc_logFormat;
};</pre>