Alright, the problem I am having is with a GUI control, I want to add a filtered list of the player's weapons.
The below code doesnt filter the desired content (and yes, there is an array defined already called this.bannedNPCs)
flip the for() loops around, and it filters nothing, but duplicates the output a couple times
for example: -wep, -wep, -wep, -wep, -anotherwep, and so on
PHP Code:
function LAucItem.onSelect(id, txt, ind) {
L_List.clearrows();
if(txt == "NPC") {
for(temp.weps : this.bannedNPCs) {
for(temp.i = 0; temp.i < player.weapons.size(); temp.i++) {
if(!player.weapons[temp.i].name.starts(temp.weps))
L_List.addrow(temp.i, player.weapons[temp.i].name);
}
}
}
}
Any ideas on how to fix this?
Thanks!