Problem with $item(bank,pack#,slot#) when pack# > 7

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

portilicious
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Mar 02, 2004 5:53 pm

Problem with $item(bank,pack#,slot#) when pack# > 7

Post by portilicious » Tue Mar 02, 2004 6:31 pm

When trying to use $item(bank,pack#,slot#) with containers or backpacks in bank slots greater than seven (pack#'s 8-17), returns NULL, even though cotainers or backpacks exist in those bank slots and contain items in the specified slot #.

For example,

/echo $item(bank,8,0)
/echo $item(bank,8,0,name)

both commands display NULL though a backpack exists in the bank slot and an item exists in slot zero of the backpack.

/banklist

command appears to work as expected and shows items in those slots.


Thanks in advance
Last edited by portilicious on Tue Mar 02, 2004 9:19 pm, edited 1 time in total.

Furiousness
a lesser mummy
a lesser mummy
Posts: 62
Joined: Tue Aug 26, 2003 3:48 pm

Post by Furiousness » Tue Mar 02, 2004 9:05 pm

OK, are we all missing something really obvious hence why no one has replied? Or is it just being ignored?

Regards

Furiousness
a lesser mummy
a lesser mummy
Posts: 62
Joined: Tue Aug 26, 2003 3:48 pm

Post by Furiousness » Tue Mar 02, 2004 9:31 pm

****Changed top line to <18 working good *****
The first line I believe is causing the issues, as after I changed it to 19 it happily spat out the results correctly instead of NULL's for the the slots after 7. Can someone please investigate that there is no follow on effects for this if it is changed, ie error checking for those with only 8 slots etc. My coding isn't all that great when it comes to the common functions, but I do know logic.

Code: Select all

if (Pack<18) {    
            if (Bank==0) {
                if (!Enviro) {
                    if (!pCharInfo->InventoryArray[22+Pack]) return PMP_ERROR_BADPARM;
                    pItem = pCharInfo->InventoryArray[22+Pack];
                } else {
                    pItem = GetEnviroContainer();
                }
                if (MainSlot==0) {
                    if ((!pItem) || (pItem->Item->Type != ITEMTYPE_PACK && !Enviro) || (pItem->Item->Slots<=Slot)) {
                        pItem=NULL;
                    } else if (pItem->Contents[Slot]) {
                        pItem = pItem->Contents[Slot];
                        Enviro=FALSE;
                    } else {
                        pItem=NULL;
                    }
                }
            } else {
                if (!pCharInfo->Bank[Pack]) return PMP_ERROR_BADPARM;
                pItem = pCharInfo->Bank[Pack];
                if (MainSlot==0) {
                    if ((!pItem) || (pItem->Item->Type != ITEMTYPE_PACK) || (pItem->Item->Slots<=Slot)) {
                        pItem=NULL;
                    } else if (pItem->Contents[Slot]) {
                        pItem = pItem->Contents[Slot];
                    } else {
                        pItem=NULL;
                    }
                }
            }
        }
The above seems to be causing the issues,
Last edited by Furiousness on Wed Mar 03, 2004 6:43 pm, edited 1 time in total.

portilicious
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Mar 02, 2004 5:53 pm

Post by portilicious » Wed Mar 03, 2004 2:41 am

Furiousness wrote:The first line I believe is causing the issues, as after I changed it to 19 it happily spat out the results correctly instead of NULL's for the the slots after 7.
Thanks. I believe the value should be 18 instead of 8 or 19. I tried it and things seem to work better.

FrankJScott
naggy
naggy
Posts: 2128
Joined: Sun Feb 19, 2023 7:11 am

Top Rated Product Guide

Post by FrankJScott » Fri Aug 18, 2023 2:37 pm

Why don't you Google it! before you post

FrankJScott
naggy
naggy
Posts: 2128
Joined: Sun Feb 19, 2023 7:11 am

Useful Slot Gacor Guide

Post by FrankJScott » Sat Aug 19, 2023 10:15 am

Untuk orang berbicara tentang situs togel dan bola, pemain slot online, deposit togel, slot admin, situs slot terbaik gampang menang, judi togel dan bola, slot situs terbaik, judi terbaik, game slot online terpercaya, daftar situs judi slot terbaik dan terpercaya, situs slot besar terpercaya, situs games slot, link slot terbaik 2023, slot pulsa gampang menang, situs bola resmi terpercaya, game slot dana terpercaya, togel gacor hari ini, slot online pulsa terpercaya, daniel slot, situs judi indonesia terpercaya, Saya merekomendasikan ini situs slot for situs slot deposit pulsa terbaik, slot togel paling gacor, situs slot online terlaris, game judi online, rtp bocoran gacor, game judi dapat pulsa, judi slot terbaik, agen slot toto, situs provider pragmatic, agen judi online terpercaya, slot terbaik hari ini, www judi resmi, agen slot 2023, daftar game slot online terpercaya, situs gacor saat ini, situs slot pragmatic play, slot online resmi indonesia, togel dan slot gacor, nama situs judi slot online, judi indonesia, also. See More Best Toto Slot Guide 1b86b3c