Sorry for taking so long to post an update (been really busy). I have heeded the suggestions of Shift Kitty and Kyuande.
Your mod is causing console errors because you put a local variable outside of a function. The %i is already used while the game boots up so you're setting it again which is why it causes the huge problem. Please fix this immediately.
Here's the code now:
if (!$AK_isLoaded) {
$remapDivision[$remapCount] = "Avatar Favorites";
for (%AK_i = 1; %AK_i < 10; %AK_i++) {
$remapName[$remapCount] = "Switch to Avatar Favorite #" @ %AK_i;
$remapCmd[$remapCount] = "AK_select" @ %AK_i;
$remapCount++;
}
$remapName[$remapCount] = "Switch to Avatar Favorite #0";
$remapCmd[$remapCount] = "AK_select0";
$remapCount++;
$AK_isLoaded = 1;
}
function AK_select(%isDown, %i) {
if (%isDown) {
%fn = "config/client/AvatarFavorites/" @ %i @ ".cs";
if (isFile(%fn)) {
exec(%fn);
echo("Switched to avatar favorite #" @ %i);
}
else {
echo("No config found for avatar favorite #" @ %i);
}
clientCmdUpdatePrefs();
}
}
function AK_select1(%isDown) { AK_select(%isDown, 1); }
function AK_select2(%isDown) { AK_select(%isDown, 2); }
function AK_select3(%isDown) { AK_select(%isDown, 3); }
function AK_select4(%isDown) { AK_select(%isDown, 4); }
function AK_select5(%isDown) { AK_select(%isDown, 5); }
function AK_select6(%isDown) { AK_select(%isDown, 6); }
function AK_select7(%isDown) { AK_select(%isDown, 7); }
function AK_select8(%isDown) { AK_select(%isDown, 8); }
function AK_select9(%isDown) { AK_select(%isDown, 9); }
function AK_select0(%isDown) { AK_select(%isDown, 0); }
I was able to replicate the original error, and independently verify that Kyuande's suggestion fixed the problem.
Here's a link to the fixed add-on if anyone would like to verify that this fix works for others.