Comrades in Arms Discussion Board

Full Version: co06_spike_team
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,

I get error when I JIP.

[Image: mini_365173spiketeam.jpg]

cya.

Nikiller.

Nephris

I received the sam error.
And i know those "not defined variable error" by my own init files.
Although the variable is defined, but not in the init.itself.
A short sleep 0.01 did the trick for me.
hi,

I think it is because the player doesn't exist yet before the mission is initialized then his name or the name of the group is undefined for the game engine and it create an error.

I made a little script at start of the init.sqf to prevent this problem:

init.sqf
Code:
//init.sqf proper init by Nikiller
if (isServer) then {
    if(isNil "nik_mission_init") then {
        nik_mission_init = false;
        publicVariable "nik_mission_init";
    };
} else {
    waitUntil{!isNil "nik_mission_init"};
};

processInitCommands;
//put your init stuff (i.e setViewDistance)
finishMissionInit;

if (isServer) then {
    nik_mission_init = true;
    publicVariable "nik_mission_init";
} else {
    waitUntil{nik_mission_init};
};

// init.sqf continue (i.e the BIS function module initialization)
waitUntil{!isNil "BIS_fnc_init"};

if (true) exitWith {};

Execute the briefing.sqf like this:

initjipcompatible.sqf
Code:
// proper execution of the briefing JIP compatible by Nikiller
//wait until the player exist
if (!(isNull player)) then
    {
       execVM "briefing.sqf";
    };
//for JIP players
if (!isServer && isNull player) then
    {
    waitUntil {!isNull player};

       execVM "briefing.sqf";
    };
if (true) exitWith {};

cya.

Nikiller.