POL97 29-10-2006 - EnumerateItemsInContainer

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm

POL97 29-10-2006 - EnumerateItemsInContainer

Post 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.");


Last edited by qrak on Thu Nov 02, 2006 8:57 pm, edited 1 time in total.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post 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.
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm

Post 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.
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

Check objtypes text, to make sure that is your gold objtype, and so on for me please.
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm

Post by qrak »

Ok it's working now. Changed from 0xeed to 0x0eed (objtype from itemdesc)
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

Thought it might be something along those lines :)
Locked