Code
16:50:59 Error Nicht definierte Variable in Ausdruck: life_session_completed
16:50:59 File mpmissions\__CUR_MP.Malden\core\init.sqf, line 44
16:50:59 Error in expression <
[] call SOCK_fnc_dataQuery;
waitUntil {life_session_completed};
0 cutText[local>
16:50:59 Error position: <life_session_completed};
0 cutText[local>
Hallo, ich kriege diese Fehlermeldung über den Client Log und hocke dann im schwarzen Bildschirm mit >Empfange Daten vom Server fest.
Code: fn_requestReceived.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_requestReceived.sqf
Author: Bryan "Tonic" Boardwine
Description:
Called by the server saying that we have a response so let's
sort through the information, validate it and if all valid
set the client up.
*/
private _count = count _this;
life_session_tries = life_session_tries + 1;
if (life_session_completed) exitWith {}; //Why did this get executed when the client already initialized? Fucking arma...
if (life_session_tries > 3) exitWith {cutText[localize "STR_Session_Error","BLACK FADED"]; 0 cutFadeOut 999999999;};
0 cutText [localize "STR_Session_Received","BLACK FADED"];
0 cutFadeOut 9999999;
//Error handling and junk..
if (isNil "_this") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (_this isEqualType "") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (count _this isEqualTo 0) exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if ((_this select 0) isEqualTo "Error") exitWith {[] call SOCK_fnc_insertPlayerInfo;};
if (!(getPlayerUID player isEqualTo (_this select 0))) exitWith {[] call SOCK_fnc_dataQuery;};
//Lets make sure some vars are not set before hand.. If they are get rid of them, hopefully the engine purges past variables but meh who cares.
if (!isServer && (!isNil "life_adminlevel" || !isNil "life_coplevel" || !isNil "life_donorlevel")) exitWith {
[profileName,getPlayerUID player,"VariablesAlreadySet"] remoteExecCall ["SPY_fnc_cookieJar",RSERV];
[profileName,format ["Variables set before client initialization...\nlife_adminlevel: %1\nlife_coplevel: %2\nlife_donorlevel: %3",life_adminlevel,life_coplevel,life_donorlevel]] remoteExecCall ["SPY_fnc_notifyAdmins",RCLIENT];
sleep 0.9;
failMission "SpyGlass";
};
//Parse basic player information.
CASH = parseNumber (_this select 2);
BANK = parseNumber (_this select 3);
CONST(life_adminlevel,(_this select 4));
if (LIFE_SETTINGS(getNumber,"donor_level") isEqualTo 1) then {
CONST(life_donorlevel,(_this select 5));
} else {
CONST(life_donorlevel,0);
};
//Loop through licenses
if (count (_this select 6) > 0) then {
{missionNamespace setVariable [(_x select 0),(_x select 1)];} forEach (_this select 6);
};
//Parse side specific information.
switch (playerSide) do {
case west: {
CONST(life_coplevel,(_this select 7));
CONST(life_medicLevel,0);
life_blacklisted = _this select 9;
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 10) select 0);
life_thirst = ((_this select 10) select 1);
player setDamage ((_this select 10) select 2);
};
};
case civilian: {
life_is_arrested = _this select 7;
CONST(life_coplevel, 0);
CONST(life_medicLevel, 0);
life_houses = _this select (_count - 2);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};
//Position
if (LIFE_SETTINGS(getNumber,"save_civilian_position") isEqualTo 1) then {
life_is_alive = _this select 10;
life_civ_position = _this select 11;
if (life_is_alive) then {
if !(count life_civ_position isEqualTo 3) then {diag_log format ["[requestReceived] Bad position received. Data: %1",life_civ_position];life_is_alive =false;};
if (life_civ_position distance (getMarkerPos "respawn_civilian") < 300) then {life_is_alive = false;};
};
};
{
_house = nearestObject [(call compile format ["%1",(_x select 0)]), "House"];
life_vehicles pushBack _house;
} forEach life_houses;
life_gangData = [_this select (_count - 4),_this select (_count - 3)];
if(!(life_gangData isEqualTo [-1,-1])) then {
[(life_gangData select 0)] spawn life_fnc_gang_findGang;
} else {
[player] join grpNull;
player setVariable ["gang_init_done",true,true];
};
[] spawn life_fnc_initHouses;
};
case independent: {
CONST(life_medicLevel,(_this select 7));
CONST(life_coplevel,0);
if (LIFE_SETTINGS(getNumber,"save_playerStats") isEqualTo 1) then {
life_hunger = ((_this select 9) select 0);
life_thirst = ((_this select 9) select 1);
player setDamage ((_this select 9) select 2);
};
};
};
life_gear = _this select 8;
call life_fnc_loadGear;
if (count (_this select (_count - 1)) > 0) then {
{life_vehicles pushBack _x;} forEach (_this select (_count - 1));
};
life_session_completed = true;
Alles anzeigen
Code: init.sqf
#include "..\script_macros.hpp"
/*
File: init.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master client initialization file
*/
diag_log "----------------------------------------------------------------------------------------------------";
diag_log "--------------------------------- Starting Malden Life Client Init ----------------------------------";
diag_log format["------------------------------------------ Version %1 -------------------------------------------",(LIFE_SETTINGS(getText,"framework_version"))];
diag_log "----------------------------------------------------------------------------------------------------";
0 cutText[localize "STR_Init_ClientSetup","BLACK FADED",99999999];
_timeStamp = diag_tickTime;
waitUntil {!isNull (findDisplay 46)};
[] call compile preprocessFileLineNumbers "core\clientValidator.sqf";
enableSentences false;
diag_log "[Life Client] Initialization Variables";
[] call compile preprocessFileLineNumbers "core\configuration.sqf";
diag_log "[Life Client] Variables initialized";
diag_log "[Life Client] Setting up Eventhandlers";
[] call life_fnc_setupEVH;
diag_log "[Life Client] Eventhandlers completed";
diag_log "[Life Client] Setting up user actions";
[] call life_fnc_setupActions;
diag_log "[Life Client] User actions completed";
diag_log "[Life Client] Waiting for the server to be ready...";
waitUntil {!isNil "life_server_isReady" && {!isNil "life_server_extDB_notLoaded"}};
if (life_server_extDB_notLoaded) exitWith {
0 cutText [localize "STR_Init_ExtdbFail","BLACK FADED",99999999];
};
waitUntil {life_server_isReady};
diag_log "[Life Client] Server loading completed ";
0 cutText [localize "STR_Init_ServerReady","BLACK FADED",99999999];
[] call SOCK_fnc_dataQuery;
waitUntil {life_session_completed};
0 cutText[localize "STR_Init_ClientFinish","BLACK FADED",99999999];
[] spawn life_fnc_escInterupt;
switch (playerSide) do {
case west: {
life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop");
[] call life_fnc_initCop;
};
case civilian: {
life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_civ");
[] call life_fnc_initCiv;
};
case independent: {
life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_med");
[] call life_fnc_initMedic;
};
};
CONSTVAR(life_paycheck);
player setVariable ["restrained", false, true];
player setVariable ["Escorting", false, true];
player setVariable ["transporting", false, true];
player setVariable ["playerSurrender", false, true];
player setVariable ["realname", profileName, true];
diag_log "[Life Client] Past Settings Init";
[] execFSM "core\fsm\client.fsm";
diag_log "[Life Client] Executing client.fsm";
(findDisplay 46) displayAddEventHandler ["KeyDown", "_this call life_fnc_keyHandler"];
[player, life_settings_enableSidechannel, playerSide] remoteExecCall ["TON_fnc_manageSC", RSERV];
[] call life_fnc_hudSetup;
[] spawn life_fnc_survival;
0 cutText ["","BLACK IN"];
[] spawn {
for "_i" from 0 to 1 step 0 do {
waitUntil {(!isNull (findDisplay 49)) && {(!isNull (findDisplay 602))}}; // Check if Inventory and ESC dialogs are open
(findDisplay 49) closeDisplay 2; // Close ESC dialog
(findDisplay 602) closeDisplay 2; // Close Inventory dialog
};
};
addMissionEventHandler ["EachFrame", life_fnc_playerTags];
addMissionEventHandler ["EachFrame", life_fnc_revealObjects];
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 0) then {player enableFatigue false;};
if (LIFE_SETTINGS(getNumber,"pump_service") isEqualTo 1) then {
[] execVM "core\fn_setupStationService.sqf";
};
life_fnc_RequestClientId = player;
publicVariableServer "life_fnc_RequestClientId";
/*
https://feedback.bistudio.com/T117205 - disableChannels settings cease to work when leaving/rejoining mission
Universal workaround for usage in a preInit function. - AgentRev
Remove if Bohemia actually fixes the issue.
*/
{
_x params [["_chan",-1,[0]], ["_noText","false",[""]], ["_noVoice","false",[""]]];
_noText = [false,true] select ((["false","true"] find toLower _noText) max 0);
_noVoice = [false,true] select ((["false","true"] find toLower _noVoice) max 0);
_chan enableChannel [!_noText, !_noVoice];
} forEach getArray (missionConfigFile >> "disableChannels");
if (life_HC_isActive) then {
[getPlayerUID player, player getVariable ["realname", name player]] remoteExec ["HC_fnc_wantedProfUpdate", HC_Life];
} else {
[getPlayerUID player, player getVariable ["realname", name player]] remoteExec ["life_fnc_wantedProfUpdate", RSERV];
};
0 call life_fnc_gang_initFunctions;
diag_log "----------------------------------------------------------------------------------------------------";
diag_log format [" End of Malden Life Client Init :: Total Execution Time %1 seconds ",(diag_tickTime - _timeStamp)];
diag_log "----------------------------------------------------------------------------------------------------";
Alles anzeigen
Dort ist die Variable