I tried replacing the line below with the call to IsInList with a simple "IF 0" conditional, and the script worked as it should. As soon as I added back in one of the calls to IsInList, it stopped working. Am I making some kind of a syntax error? It compiles fine in the GECK.
rArmor is a ref variable, and PPAT51b is a formlist with the vanilla T-51b armor in it.
begin gamemode IF sRemoveCount IF sRemoveCounter < sRemoveCount set sRemoveCounter to sRemoveCounter + 1 ELSE set sRemoveCounter to 0 set sRemoveCount to 0 rContainer.removeitem PPAMLCLower 1 1 ENDif ELSE set rContainer to getcontainer IF rContainer.isActor set rArmor to rContainer.getequippedobject 2 IF isPowerArmor rArmor IF rArmor.isinlist PPAT51b ; || rArmor.isinlist PPAAPA ELSE IF rcontainer.getitemcount PPALCLower ELSE rContainer.additem PPALCLower 1 1 rContainer.equipitem PPALCLower 1 0 set sRemoveCount to 1 + getrandompercent / 10 return ENDif ENDif ENDif ENDif ENDifend