Page MenuHomeFeedback Tracker

paramsArray no longer avaiable during preInit on server
Closed, ResolvedPublic

Description

In previous Arma 3 versions patchs (1.42) 'paramsArray' was available on the server in multiplayer during preInit. As on 1.44 'paramsArray' is no longer available during preInit on the server. This breaks part of the F3 framework. As we use mission parameters during the init of particular units to determine what gear they use, this feature is now broken.

Details

Legacy ID
3581615952
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Engine
Steps To Reproduce

Here is the parameter processor that is run during preInit (preInit is declared from CfgFunctions):
//description.ext:
class CfgFunctions
{
class F
{

		class common
		{
			
			class processParamsArray
			{
                                file = "test.sqf";
				preInit = 1;
			};

		};
         };

};
class Params
{

class f_param_medical
{
        title = "Medical System";
        values[] = {0,1};
        texts[] = {"Arma 3 Default","Authentic Gameplay Mod"};
        default = 1;
};

};

//test.sqf
if (isMultiplayer) then {
if (isServer) then {

		{
			_paramName =(configName ((missionConfigFile >> "Params") select _forEachIndex));
			_paramValue = (paramsArray select _forEachIndex);
			missionNamespace setVariable[_paramName,_paramValue];
			publicVariable _paramName;
		} forEach paramsArray;

};
} else {
//Values must be default in SP anyway and paramsArray doesn't exist in SP till postInit.
{

		_paramName = (configName _x);
		_paramValue = (getNumber (missionConfigFile >> "Params" >> _paramName >> "default"));
		missionNamespace setVariable[_paramName,_paramValue];

} forEach ((missionConfigFile >> "Params") call bis_fnc_returnChildren);
};

// From a client using the debug console your'll notice that in Arma 3 1.42 'f_param_medical' has a value and in 1.44 it does not.

Event Timeline

Snippers edited Steps To Reproduce. (Show Details)May 5 2015, 10:35 PM
Snippers set Category to Engine.
Snippers set Reproducibility to Always.
Snippers set Severity to None.
Snippers set Resolution to Fixed.
Snippers set Legacy ID to 3581615952.May 8 2016, 12:02 PM
Snippers edited a custom field.

Further notes: In MP Editor 'paramsArray' exists during preInit, on a dedicated server it does not.

This means we cant do things like set mission time in params. I hope this gets fixed.

This is not fixed. You can call function when param is selected. this function is supposed to receive _this with selected param as well. Both _this and paramsArray are undefined when this function is called.

class Params
{
class Hours
{

		title = "Mission Time / Hours";
		texts[] = {"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"};
		values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};
		default = 12;
		function = "KK_fnc_test"; ///<<<<<<<----- F U N C T I O N

};
};

Confirmed not fixed. :(

And still not fixed in 1.48

Seems resolved. Please request reopening if this is not the case.