PHP Code:
function LAucItem.onSelect(id, txt, ind) {
L_List.clearrows();
if (txt == "NPC") {
for (temp.i = 0; temp.i < player.weapons.size(); temp.i++) {
temp.notBanned = true;
for (temp.weps : this.bannedNPCs) {
if (player.weapons[temp.i].name.starts(temp.weps)) {
temp.notBanned = false;
break;
}
}
if (temp.notBanned)
L_List.addrow(temp.i, player.weapons[temp.i].name);
}
}
}
Should work, and do what you were trying to do in the first function.