you could put the following into AF_KP_vars.sqf
errorcounter = 0;
then just increment it in the enter statement in AF_KP_fncs.sqf
case "enter": {
if (code isnotequalto inputText) then {
errorcounter = errorcounter + 1;
};
if (errorcounter == 3) then { // Add what you want to be executed here
"do something";
};
OutputText = InputText;
hint format["Keycode is %1", OutputText];
closeDialog 0;
InputText = "";
};
Not quite sure if it's what you're asking.