I add this system , and i have a problem compiled shop.cc
and i have this syser
shop.cpp: In member function 'virtual int CShop::Buy(CHARACTER*, BYTE)':
shop.cpp:258: error: 'item' was not declared in this scope
shop.cpp:260: error: 'item' was not declared in this scope
shop.cpp:262: error: 'item' was not declared in this scope
shop.cpp:278: error: 'item' was not declared in this scope
shop.cpp:291: error: 'item' was not declared in this scope
shop.cpp:296: error: 'item' was not declared in this scope
shop.cpp:360: error: 'item' was not declared in this scope
shop.cpp:405: error: 'item' was not declared in this scope
shop.cpp:409: error: 'item' was not declared in this scope
shop.cpp:420: error: 'item' was not declared in this scope
gmake: *** [Makefile:131: OBJDIR/shop.o] Error 1
- // void CShop::SetShopItems(TShopItemTable * pTable, BYTE bItemCount) Fonksiyonun içinde ara:
- item.price = pTable->price; // yada
- item.count = pTable->count; // hangisi varsa
- // Altına ekle:
- #ifdef ENABLE_BUY_WITH_ITEM item.witemVnum = pTable->witemVnum;
- #endif
- // int CShop::Buy( fonksiyonunun içinde ara:
- DWORD dwPrice = r_item.price; // Altına ekle:
- #ifdef ENABLE_BUY_WITH_ITEM DWORD dwWItemVnum = r_item.witemVnum;
- #endif
- // Arat: if (ch->GetGold() < (int) dwPrice) { sys_log(1, "Shop::Buy : Not enough money : %s has %d, price %d", ch->GetName(), ch->GetGold(), dwPrice); return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY; }
- // Değiştir:
- #ifdef ENABLE_BUY_WITH_ITEM if (dwWItemVnum > 0) if (ch->CountSpecifyItem(dwWItemVnum) < (int)dwPrice) return SHOP_SUBHEADER_GC_NOT_ENOUGH_ITEM; else if (ch->GetGold() < (int) dwPrice)
- #else if (ch->GetGold() < (int) dwPrice)
- #endif
- // Arat: ch->PointChange(POINT_GOLD, -dwPrice, false);
- // Değiştir:
- #ifdef ENABLE_BUY_WITH_ITEM if (dwWItemVnum > 0) ch->RemoveSpecifyItem(dwWItemVnum, dwPrice); else ch->PointChange(POINT_GOLD, -dwPrice, false);
- #else ch->PointChange(POINT_GOLD, -dwPrice, false);
- #endif
- // Arat: pack2.items[i].price = item.price;
- // Altına ekle:
- #ifdef ENABLE_BUY_WITH_ITEM pack2.items[i].witemVnum = item.witemVnum;
- #endif
- // Arat: else if (!m_pkPC && !IsPCShop())
- // İçine ekle:
- #ifdef ENABLE_BUY_WITH_ITEM pack2.item.witemVnum = m_itemVector[pos].witemVnum;
- #endif