{"action":"created","issue":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/106","labels_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/106/comments","events_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/106/events","html_url":"https://github.com/CBATeam/CBA_A3/issues/106","id":99598997,"number":106,"title":"Adding a keybind twice results in the keybind action executing twice","user":{"login":"Killswitch00","id":12647603,"avatar_url":"https://avatars.githubusercontent.com/u/12647603?v=3","gravatar_id":"","url":"https://api.github.com/users/Killswitch00","html_url":"https://github.com/Killswitch00","followers_url":"https://api.github.com/users/Killswitch00/followers","following_url":"https://api.github.com/users/Killswitch00/following{/other_user}","gists_url":"https://api.github.com/users/Killswitch00/gists{/gist_id}","starred_url":"https://api.github.com/users/Killswitch00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Killswitch00/subscriptions","organizations_url":"https://api.github.com/users/Killswitch00/orgs","repos_url":"https://api.github.com/users/Killswitch00/repos","events_url":"https://api.github.com/users/Killswitch00/events{/privacy}","received_events_url":"https://api.github.com/users/Killswitch00/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CBATeam/CBA_A3/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/milestones/3","html_url":"https://github.com/CBATeam/CBA_A3/milestones/CBA_A3%20v2.0","labels_url":"https://api.github.com/repos/CBATeam/CBA_A3/milestones/3/labels","id":1144929,"number":3,"title":"CBA_A3 v2.0","description":"ASDG JR and JAM\r\nRewrite of XEH System for A3","creator":{"login":"ViperMaul","id":345876,"avatar_url":"https://avatars.githubusercontent.com/u/345876?v=3","gravatar_id":"","url":"https://api.github.com/users/ViperMaul","html_url":"https://github.com/ViperMaul","followers_url":"https://api.github.com/users/ViperMaul/followers","following_url":"https://api.github.com/users/ViperMaul/following{/other_user}","gists_url":"https://api.github.com/users/ViperMaul/gists{/gist_id}","starred_url":"https://api.github.com/users/ViperMaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViperMaul/subscriptions","organizations_url":"https://api.github.com/users/ViperMaul/orgs","repos_url":"https://api.github.com/users/ViperMaul/repos","events_url":"https://api.github.com/users/ViperMaul/events{/privacy}","received_events_url":"https://api.github.com/users/ViperMaul/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":9,"state":"open","created_at":"2015-06-02T13:22:28Z","updated_at":"2015-08-14T08:52:59Z","due_on":"2015-08-10T07:00:00Z","closed_at":null},"comments":2,"created_at":"2015-08-07T07:52:26Z","updated_at":"2015-08-14T08:52:59Z","closed_at":"2015-08-14T08:52:59Z","body":"As reported by BI forum member Lala [here](https://forums.bistudio.com/topic/168277-cba-community-base-addons-arma-3/page-24#entry2895294)\r\n\r\nHey CBA Team!\r\n\r\nJust wanted to post about cba_fnc_addKeybind bug.\r\nBasically when adding a keybind twice with the same mod name and action ID it is supposed to update, however instead what it seems to be doing is actually executing the old instance and new instance with the same key being pressed, with the result of nothing happening.\r\nEDIT I found out that if executed an 'odd' number of times it works but an 'even' number of times causing no output.\r\n\r\nSteps to reproduce.\r\n\r\n1. Go into mission editor and place down a man then preview mission\r\n2. use this as example and execute it in the debug console.\r\n```\r\n[\"Testing\", \"TesterKeyID\", [\"This is a test\", \"This is a test\"], {if (missionNamespace getVariable [\"testingCBAkeybind\",false]) then { systemChat \"var true\"; missionNamespace setVariable [\"testingCBAkeybind\",!(missionNamespace getVariable [\"testingCBAkeybind\",false])]; } else { systemChat \"var false\"; missionNamespace setVariable [\"testingCBAkeybind\",!(missionNamespace getVariable [\"testingCBAkeybind\",false])]; }}, { }, [181, [false, false, false]],nil, nil, false] call cba_fnc_addKeybind;\r\n```\r\n3. Press 'Numpad /' and Observe the systemChat messages\r\n4. Execute above code again\r\n5. Press 'Numpad /' and Observe nothing appearing in systemChat\r\n6. Execute same code again\r\n7. Press 'Numpad /' and Observe System Chat messages appear again\r\nHope there is a solution, for now I'm going to make a temporary hot fix in my script code to account for this. "},"comment":{"url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/comments/131030143","html_url":"https://github.com/CBATeam/CBA_A3/issues/106#issuecomment-131030143","issue_url":"https://api.github.com/repos/CBATeam/CBA_A3/issues/106","id":131030143,"user":{"login":"Killswitch00","id":12647603,"avatar_url":"https://avatars.githubusercontent.com/u/12647603?v=3","gravatar_id":"","url":"https://api.github.com/users/Killswitch00","html_url":"https://github.com/Killswitch00","followers_url":"https://api.github.com/users/Killswitch00/followers","following_url":"https://api.github.com/users/Killswitch00/following{/other_user}","gists_url":"https://api.github.com/users/Killswitch00/gists{/gist_id}","starred_url":"https://api.github.com/users/Killswitch00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Killswitch00/subscriptions","organizations_url":"https://api.github.com/users/Killswitch00/orgs","repos_url":"https://api.github.com/users/Killswitch00/repos","events_url":"https://api.github.com/users/Killswitch00/events{/privacy}","received_events_url":"https://api.github.com/users/Killswitch00/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T08:52:59Z","updated_at":"2015-08-14T08:52:59Z","body":"Not a bug - wrong use of the function. The \"_overwrite\" parameter (last parameter in the call to CBA_fnc_addKeybind) should be set to true (default: false) in order to update the key bind."}}