{"name":"BIS_fnc_counter","title":"BIS fnc counter","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_counter","revid":363648,"updated":"2024-04-11T15:43:06Z","groups":["Systems"],"status":"ok","games":{"tkoh":"1.00","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Modify the given counter, create it if does not exist.\n\n> [!IMPORTANT]\n> It is **not** possible to broadcast the counter (like setVariable does) with this function.","syntaxes":[{"syntax":"[varName, add, modulo] call BIS_fnc_counter","params":[{"name":"varName","type":"String or Array format [varName, namespace]","description":"default namespace is missionNamespace","type_expr":"String | Array"},{"name":"add","type":"Number","optional":true,"default":"0","description":"the value to be added","type_expr":"Number","text":"add: Number - (Optional, default 0) the value to be added"},{"name":"modulo","type":"Number","optional":true,"default":"-1","description":"the modulo to use for counter cycle, applied after the addition","type_expr":"Number","text":"modulo: Number - (Optional, default -1) the modulo to use for counter cycle, applied after the addition"}],"returns":{"type":"Number","type_expr":"Number","description":"the new counter value","text":"Number the new counter value"}}],"examples":[{"code":["[[\"TAG_Score\", player], 1] call BIS_fnc_counter;"]}],"see_also":["BIS_fnc_deleteCounter"]}