While loop needs to check for valid inventory item, not valid pc. The pc will never be invalid at the while loop, since earlier in the script it would have ended if that was the case and oPC is never assigned a different value inside the loop, so the loop never ends and eventually you run out of instructions. Since it is the inventory item that changes inside the while loop, that's what you should be checking for to end the loop.
[nwscript]
void main()
{ object oPC = GetItemActivatedTarget();
if( !GetIsPC( oPC )) return; // End if this isn't a PC
SetDiety( oPC, "Fate" );
object oInvItem = GetFirstItemInInventory( oPC );
while( GetIsObjectValid( oInvItem ))
{ if( GetLocalInt( oInvItem, "Fate" )) DestroyObject( oInvItem );
oInvItem = GetNextItemInInventory( oPC );
}
}[/nwscript]
Modifié par Axe_Murderer, 04 août 2011 - 12:53 .