Page 1 of 1

POL97 29-10-2006 - EnumerateItemsInContainer

Posted: Wed Nov 01, 2006 10:37 am
by qrak
EnumerateItemsInContainer doesn't check for subcontainers even with defaultflag = 0

You can check this using:

Code: Select all


  bankbox := FindBankBox(ev.source);
        contents := EnumerateItemsInContainer(bankbox);
        amt := 0;
          foreach item in contents
            if(item.objtype == 0xeed)
              amt := (amt + item.amount);
            endif
          endforeach

          PrintTextAbove(me,"Your bankbox contains " + amt + " gold coins.");



Posted: Thu Nov 02, 2006 7:27 pm
by MuadDib
Is the gold in a locked container, and, is the bankbox itself locked? That could be 1 issue involved in it. If not, let me know.

Posted: Thu Nov 02, 2006 9:02 pm
by qrak
Both containers aren't locked. Anyway problem occuring only in gold couting (if im using var := var + var). But didn't tested it deeply.

Posted: Thu Nov 02, 2006 9:29 pm
by MuadDib
Check objtypes text, to make sure that is your gold objtype, and so on for me please.

Posted: Fri Nov 03, 2006 5:54 am
by qrak
Ok it's working now. Changed from 0xeed to 0x0eed (objtype from itemdesc)

Posted: Fri Nov 03, 2006 11:22 am
by MuadDib
Thought it might be something along those lines :)