talking about filters... here is another problem I have (and I really have enough of them
)
In our mod there is a filter script that seems to have lots of bugs
Here's one of them:
there is a section where items are checked for their properties:
void Destroy(object oPC, object oItem )
{
string Sname = GetName(oItem);
int Bannet = 0;
int Boot = 0;
int Bugg = 0;
int BootX = 0;
int HackBack = 0;
object oItem = GetFirstItemInInventory(oPC);
if(GetIsDM(GetEnteringObject()))return;
if(!GetIsPC(GetEnteringObject()))return;
if (GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRUE_SEEING)== TRUE)
{
itemproperty ipLoop=GetFirstItemProperty(oItem);
while (GetIsItemPropertyValid(ipLoop))
{
if (GetItemPropertyType(ipLoop)==ITEM_PROPERTY_TRUE_SEEING)
RemoveItemProperty(oItem, ipLoop);
ipLoop=GetNextItemProperty(oItem);
}
}
... this is how it goes for every unwanted property.
When all properties are checked like that, this section "Destroy" ends.
Then there is another section that goes like this:
void Check(object oPC)
{
object oPC = GetEnteringObject();
object oEquipt;
object Erst_Next = GetFirstItemInInventory(oPC);
...
then there is a loop part in that section:
while(GetIsObjectValid(Erst_Next))
{
Destroy(oPC, Erst_Next);
Erst_Next = GetNextItemInInventory(oPC);
}
Now the problem seems to be that this loop won't take place right. It must be that way because more and more players can get in our mod with items that have unwanted properties normally deleted by the filter-script.
How should I adjust the script?