Fixed format usage in macros requiring ARR_# for it to work

This commit is contained in:
Michael Braun 2015-08-26 16:48:55 +02:00
parent 9e10aa86d7
commit 097506076f
30 changed files with 46 additions and 46 deletions

View File

@ -40,7 +40,7 @@
["HeadbugFixUsed", {
PARAMS_2(_profileName,_animation);
ACE_LOGINFO(format ["Headbug Used: Name: %1, Animation: %2", _profileName, _animation]);
ACE_LOGINFO(format [ARR_3("Headbug Used: Name: %1, Animation: %2", _profileName, _animation)]);
}] call FUNC(addEventHandler);

View File

@ -18,15 +18,15 @@ if (_eventType == "ACEg") then {
_events = (GVAR(events) select 1) select _eventIndex;
#ifdef DEBUG_EVENTS
ACE_LOGINFO(format ["* Net Event %1", _eventName]);
ACE_LOGINFO(format [" args=%1", _eventArgs]);
ACE_LOGINFO(format [ARR_2("* Net Event %1", _eventName)]);
ACE_LOGINFO(format [ARR_2(" args=%1", _eventArgs)]);
#endif
{
if (!isNil "_x") then {
_eventArgs call CALLSTACK_NAMED(_x, format ["Net Event %1 ID: %2", _eventName, _forEachIndex]);
_eventArgs call CALLSTACK_NAMED(_x, format [ARR_3("Net Event %1 ID: %2", _eventName, _forEachIndex)]);
#ifdef DEBUG_EVENTS_CALLSTACK
ACE_LOGINFO(format [" ID: %1", _forEachIndex]);
ACE_LOGINFO(format [ARR_2(" ID: %1", _forEachIndex)]);
#endif
};
} forEach _events;

View File

@ -42,7 +42,7 @@ if(isServer) then {
_eventArgs = _x select 1;
[_eventName, _eventArgs, (_x select 2)] call FUNC(_handleSyncedEvent);
} forEach _eventLog;
ACE_LOGINFO(format ["[%1] synchronized", _eventName]);
ACE_LOGINFO(format [ARR_2("[%1] synchronized", _eventName)]);
};
true

View File

@ -88,7 +88,7 @@ switch ((_type select 0)) do {
};
};
default {
ACE_LOGWARNING(format ["Incorrect item type passed to %1, passed: %2", QFUNC(AddToInventory), _type]);
ACE_LOGWARNING(format [ARR_3("Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type)]);
};
};

View File

@ -40,7 +40,7 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
private ["_varName","_cacheList"];
// _eventName is defined on the function that calls the event
#ifdef DEBUG_MODE_FULL
ACE_LOGINFO(format ["Clear cached variables on event: %1", _eventName]);
ACE_LOGINFO(format [ARR_2("Clear cached variables on event: %1", _eventName)]);
#endif
// Get the list of caches to clear
_varName = format [QGVAR(clearCache_%1),_eventName];
@ -58,9 +58,9 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
_cacheList pushBack [_namespace, _uid];
};
#ifdef DEBUG_MODE_FULL
ACE_LOGINFO(format ["Calculated result: %1 %2", _namespace, _uid]);
ACE_LOGINFO(format [ARR_3("Calculated result: %1 %2", _namespace, _uid)]);
} else {
ACE_LOGINFO(format ["Cached result: %1 %2", _namespace, _uid]);
ACE_LOGINFO(format [ARR_3("Cached result: %1 %2", _namespace, _uid)]);
#endif
};

View File

@ -17,7 +17,7 @@
private "_version";
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
ACE_LOGINFO(format ["ACE is version %1.", _version]);
ACE_LOGINFO(format [ARR_2("ACE is version %1.", _version)]);
private "_addons";
_addons = activatedAddons;
@ -51,7 +51,7 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
};
} else {
// Print the current extension version
ACE_LOGINFO(format ["Extension version: %1: %2", _x, (_x callExtension "version")]);
ACE_LOGINFO(format [ARR_3("Extension version: %1: %2", _x, (_x callExtension "version"))]);
};
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");

View File

@ -23,7 +23,7 @@ _force = False;
// no animation given
if (isNil "_animation") exitWith {
ACE_LOGERROR(format ["No animation specified in %1.", _fnc_scriptNameParent]);
ACE_LOGERROR(format [ARR_2("No animation specified in %1.", _fnc_scriptNameParent)]);
};
if (isNil "_priority") then {

View File

@ -5,7 +5,7 @@ PARAMS_1(_target);
{
if (isNil "_x") then {
ACE_LOGERROR(format ["No argument and function for remote function. ID: %1", _forEachIndex]);
ACE_LOGERROR(format [ARR_2("No argument and function for remote function. ID: %1", _forEachIndex)]);
} else {
if (typeName _x == "ARRAY") then {
[_x select 0, _target] call (_x select 1);

View File

@ -20,7 +20,7 @@ private ["_newArray", "_index"];
PARAMS_2(_array,_code);
if (isNil "_array") exitWith {
ACE_LOGERROR(format ["No array for function filter in %1.", _fnc_scriptNameParent]);
ACE_LOGERROR(format [ARR_2("No array for function filter in %1.", _fnc_scriptNameParent)]);
[]
};

View File

@ -44,7 +44,7 @@ _letterGrid = false;
if (((toLower _formatX) find "a") != -1) then {_letterGrid = true};
if (((toLower _formatY) find "a") != -1) then {_letterGrid = true};
if (_letterGrid) exitWith {
ACE_LOGWARNING(format ["Map Grid Warning (%1) - Map uses letter grids [%2, %3]", worldName, _formatX, _formatY]);
ACE_LOGWARNING(format [ARR_4("Map Grid Warning (%1) - Map uses letter grids [%2, %3]", worldName, _formatX, _formatY)]);
};
//Start at [0, 500] and move north until we get a change in grid
@ -64,13 +64,13 @@ _stepXat5 = _stepX * 10 ^ ((count _formatX) - 5);
_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5);
if (_stepYat5 < 0) then {
ACE_LOGWARNING(format ["Map Grid Warning (%1) - Northing is reversed.", worldName]);
ACE_LOGWARNING(format [ARR_2("Map Grid Warning (%1) - Northing is reversed.", worldName)]);
};
if (_stepXat5 != 1) then {
ACE_LOGWARNING(format ["Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x.", worldName, _stepXat5]);
ACE_LOGWARNING(format [ARR_3("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x.", worldName, _stepXat5)]);
};
if ((_stepYat5 != 1) && {_stepYat5 != -1}) then {
ACE_LOGWARNING(format ["Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y.", worldName, _stepXat5]);
ACE_LOGWARNING(format [ARR_3("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y.", worldName, _stepXat5)]);
};
GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5];

View File

@ -42,7 +42,7 @@ _parseConfigForDisplayNames = {
if !([configFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
if !([configFile >> "ACE_ServerSettings" >> _name] call _parseConfigForDisplayNames) then {
if !([missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
ACE_LOGWARNING(format ["Setting found, but couldn't localize [%1] (server has but we don't?)", _name]);
ACE_LOGWARNING(format [ARR_2("Setting found, but couldn't localize [%1] (server has but we don't?)", _name)]);
};
};
};

View File

@ -21,15 +21,15 @@ _eventIndex = _eventNames find _eventName;
if(_eventIndex != -1) then {
_events = (GVAR(events) select 1) select _eventIndex;
#ifdef DEBUG_EVENTS
ACE_LOGINFO(format ["* Local Event: %1", _eventName]);
ACE_LOGINFO(format [" args=%1", _eventArgs]);
ACE_LOGINFO(format [ARR_2("* Local Event: %1", _eventName)]);
ACE_LOGINFO(format [ARR_2(" args=%1", _eventArgs)]);
#endif
{
if(!isNil "_x") then {
_eventArgs call CALLSTACK_NAMED(_x, format ["Local Event %1 ID: %2", _eventName, _forEachIndex]);
_eventArgs call CALLSTACK_NAMED(_x, format [ARR_3("Local Event %1 ID: %2", _eventName, _forEachIndex)]);
#ifdef DEBUG_EVENTS_CALLSTACK
ACE_LOGINFO(format [" ID: %1", _forEachIndex]);
ACE_LOGINFO(format [ARR_2(" ID: %1", _forEachIndex)]);
#endif
};
} forEach _events;

View File

@ -21,7 +21,7 @@ _array = + _this select 0;
_code = _this select 1;
if (isNil "_array") exitWith {
ACE_LOGERROR(format ["No array for function map in %1.", _fnc_scriptNameParent]);
ACE_LOGERROR(format [ARR_2("No array for function map in %1.", _fnc_scriptNameParent)]);
[]
};

View File

@ -22,4 +22,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(checkPBOsCheckAll), "CheckAll" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(checkPBOsWhitelist), "Whitelist" ] call EFUNC(common,readSettingFromModule);
ACE_LOGINFO(format ["Check-PBOs Module Initialized. Mode: %1.", GVAR(checkPBOsAction)]);
ACE_LOGINFO(format [ARR_2("Check-PBOs Module Initialized. Mode: %1.", GVAR(checkPBOsAction))]);

View File

@ -16,7 +16,7 @@ PARAMS_1(_name);
private ["_data", "_eventId"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR(format ["Synced event key not found."]);
ACE_LOGERROR("Synced event key not found.");
false
};

View File

@ -16,8 +16,8 @@
PARAMS_2(_eventName,_eventArgs);
#ifdef DEBUG_EVENTS
ACE_LOGINFO(format ["* Server Event: %1", _eventName]);
ACE_LOGINFO(format [" args=%1", _eventArgs]);
ACE_LOGINFO(format [ARR_2("* Server Event: %1", _eventName)]);
ACE_LOGINFO(format [ARR_2(" args=%1", _eventArgs)]);
#endif
ACEg = [_eventName, _eventArgs];

View File

@ -21,8 +21,8 @@
PARAMS_3(_eventName,_eventTargets,_eventArgs);
#ifdef DEBUG_EVENTS
ACE_LOGINFO(format ["* Target Event: %1 - %2", _eventName, _eventTargets]);
ACE_LOGINFO(format [" args=%1", _eventArgs]);
ACE_LOGINFO(format [ARR_3("* Target Event: %1 - %2", _eventName, _eventTargets)]);
ACE_LOGINFO(format [ARR_2(" args=%1", _eventArgs)]);
#endif
ACEc = [_eventName, _eventTargets, _eventArgs];

View File

@ -38,12 +38,12 @@ if (_vehicle isKindOf "Ship" ) then {
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
if (!_validVehiclestate) exitwith {
ACE_LOGWARNING(format ["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]);
ACE_LOGWARNING(format [ARR_5("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle)]);
false
};
if (count _emptyPos == 0) exitwith {
ACE_LOGWARNING(format ["No safe empty spots to unload patient. %1", _emptyPos]);
ACE_LOGWARNING(format [ARR_2("No safe empty spots to unload patient. %1", _emptyPos)]);
false
}; //consider displaying text saying there are no safe places to exit the vehicle

View File

@ -23,4 +23,4 @@ params ["_caller", "_target", "_errorMsg"];
if (_caller != ACE_player) exitWith {};
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
ACE_LOGINFO(format ["%1 - eventCallerFinish: %2", ACE_time, _this]);
ACE_LOGINFO(format [ARR_3("%1 - eventCallerFinish: %2", ACE_time, _this)]);

View File

@ -22,6 +22,6 @@
params ["_caller", "_target", "_errorMsg"];
if (_errorMsg != "") then {
ACE_LOGINFO(format ["%1 - eventTargetFinish: %2", ACE_time, _this]);
ACE_LOGINFO(format [ARR_3("%1 - eventTargetFinish: %2", ACE_time, _this)]);
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
};

View File

@ -36,7 +36,7 @@ if (!isNull _setupPlaceholderObject) then {
};
if (isNil "_triggerConfig") exitWith {
ACE_LOGERROR(format ["Config not passed to PlaceExplosive: %1", _this]);
ACE_LOGERROR(format [ARR_2("Config not passed to PlaceExplosive: %1",_this)]);
objNull
};
@ -44,7 +44,7 @@ _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Trigge
_triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig;
if (isNil "_triggerConfig") exitWith {
ACE_LOGERROR(format ["Config not found in PlaceExplosive: %1", _this]);
ACE_LOGERROR(format [ARR_2("Config not found in PlaceExplosive: %1",_this)]);
objNull
};

View File

@ -86,7 +86,7 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
if(_gC == 0) then { _gC = 2440; _warn = true;};
if(_warn) then {
ACE_LOGWARNING(format ["Ammo class %1 lacks proper explosive properties definitions for frag!", _roundType]); //TODO: turn this off when we get closer to release
ACE_LOGWARNING(format [ARR_2("Ammo class %1 lacks proper explosive properties definitions for frag!", _roundType)]); //TODO: turn this off when we get closer to release
};
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;

View File

@ -67,7 +67,7 @@ _gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
if(_gC == 0) then { _gC = 2440; _warn = true;};
if(_warn) then {
ACE_LOGWARNING(format ["Ammo class %1 lacks proper explosive properties definitions for frag!", _shellType]); //TODO: turn this off when we get closer to release
ACE_LOGWARNING(format [ARR_2("Ammo class %1 lacks proper explosive properties definitions for frag!", _shellType)]); //TODO: turn this off when we get closer to release
};
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;

View File

@ -44,7 +44,7 @@ if (_parentPath isEqualTo ["ACE_MainActions"]) then {
_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
if (isNil {_parentNode}) exitWith {
ERROR("Failed to add action");
ACE_LOGERROR(format ["action (%1) to parent %2 on object %3 [%4]", (_action select 0), _parentPath, _objectType, _typeNum]);
ACE_LOGERROR(format [ARR_5("action (%1) to parent %2 on object %3 [%4]", (_action select 0), _parentPath, _objectType, _typeNum)]);
};
// Add action node as children of the correct node of action tree

View File

@ -84,6 +84,6 @@ switch (_currentWeaponType) do {
if (!_error) then {
[_description, _picture] call EFUNC(common,displayTextPicture);
} else {
ACE_LOGERROR(format ["Failed to add %1 to %2 - reverting to %3", _nextPointer, _weapon, _pointer]);
ACE_LOGERROR(format [ARR_4("Failed to add %1 to %2 - reverting to %3", _nextPointer, _weapon, _pointer)]);
};
playSound "ACE_Sound_Click";

View File

@ -39,7 +39,7 @@ while {true} do {
if (_temperature < 1) exitWith {0};
if (isNil "_temperature") exitWith {
ACE_LOGERROR(format ["_totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime]);
ACE_LOGERROR(format [ARR_4("_totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime)]);
0
};

View File

@ -110,7 +110,7 @@ if (_type in _initializedClasses) exitWith {};
if (typeName _position == "STRING") exitWith {
_selection = _vehicle selectionPosition _position; // Selection name
};
ACE_LOGERROR(format ["Invalid custom position %1 of hitpoint %2 in vehicle %3.", _position, _hitpoint, _vehicle]);
ACE_LOGERROR(format [ARR_4("Invalid custom position %1 of hitpoint %2 in vehicle %3.", _position, _hitpoint, _vehicle)]);
};
} forEach (getArray _customSelectionsConfig);
};

View File

@ -56,7 +56,7 @@ _currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets change
// If interaction menu module is not present, set default duration value
if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then {
_duration = 5;
ACE_LOGINFO(format ["Interaction Menu module not present, defaulting duration value to %1", _duration]);
ACE_LOGINFO(format [ARR_2("Interaction Menu module not present, defaulting duration value to %1", _duration)]);
};
// Add interactions if automatic transitions are disabled, else setup automatic transitions

View File

@ -34,4 +34,4 @@ _duration = _logic getVariable ["Duration", 0];
// Prepare with actions
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);
ACE_LOGINFO(format ["Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration]);
ACE_LOGINFO(format [ARR_3("Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration)]);

View File

@ -26,4 +26,4 @@ if (!_activated) exitWith {
[_logic, QGVAR(enabled),"moduleViewDistanceEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(limitViewDistance),"moduleViewDistanceLimit"] call EFUNC(common,readSettingFromModule);
ACE_LOGINFO(format ["View Distance Limit Module Initialized. Limit set by module: %1", GVAR(limitViewDistance)]);
ACE_LOGINFO(format [ARR_2("View Distance Limit Module Initialized. Limit set by module: %1", GVAR(limitViewDistance))]);