I think it is probably misbehaving because player.weapons[] is actually an array of weapon objects:
PHP Code:
echo(findPlayer("Skyld").weapons[0].objecttype());
... is giving "TServerNPC".
obj.index() tends to check for whatever you give it; if you give it a string and it finds TServerNPCs, then it is probably working just as expected by ignoring them.