Page 1 of 1

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

Posted: Tue Mar 02, 2004 6:31 pm
by portilicious
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

Posted: Tue Mar 02, 2004 9:05 pm
by Furiousness
OK, are we all missing something really obvious hence why no one has replied? Or is it just being ignored?

Regards

Posted: Tue Mar 02, 2004 9:31 pm
by Furiousness
****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,

Posted: Wed Mar 03, 2004 2:41 am
by portilicious
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.

Top Rated Product Guide

Posted: Fri Aug 18, 2023 2:37 pm
by FrankJScott
Why don't you Google it! before you post

Useful Slot Gacor Guide

Posted: Sat Aug 19, 2023 10:15 am
by FrankJScott
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