[C++] Buy with items [FULL]

Avatar utilizator
Alexandru-IoanIdriceanu
Nivel 3

Nivel 3
Mesaje: 332
Membru din: 28 Feb 2018, 16:08
Regat: Jinno
Aprecieri: 638  
Mulţumiri: 1902  
Discord: Copiază ID
Medalii

Cel mai smecher om , tutorial facut pentru toata lumea :ymhug:
Avatar utilizator
marcupo
Nou Venit

Nou Venit
Mesaje: 27
Membru din: 14 Noi 2016, 12:14
Aprecieri: 7  
Mulţumiri: 2  
Medalii

no bug?
Avatar utilizator
nicohare7
Nou Venit

Nou Venit
Mesaje: 22
Membru din: 12 Apr 2020, 23:42
Server: Origins
Regat: Chunjo
Aprecieri: 8  
Mulţumiri: 0
Discord: Copiază ID
Medalii

excelente sistema
Avatar utilizator
Marius Dragomir
Membru Club

Membru Club
Mesaje: 1020
Membru din: 13 Noi 2017, 21:32
Server: HellHound
Regat: Jinno
Aprecieri: 499  
Mulţumiri: 1211  
Discord: Copiază ID
Medalii

Am si eu problema asta, cum o pot rezolva?
0610 01:52:27384 ::   File "ui.py", line 1551, in OnOverInItem

0610 01:52:27384 ::   File "ui.py", line 134, in __call__

0610 01:52:27385 ::   File "ui.py", line 125, in __call__

0610 01:52:27385 ::   File "uiShop.py", line 327, in OverInItem

0610 01:52:27385 ::   File "uiToolTip.py", line 583, in SetShopItem

0610 01:52:27385 ::   File "uiToolTip.py", line 1405, in AppendPriceTextLine

0610 01:52:27386 :: TypeError
0610 01:52:27386 :: : 
0610 01:52:27386 :: not all arguments converted during string formatting
0610 01:52:27386 :: 

Pentru acest mesaj, Marius Dragomir a primit 6 (de) mulţumiri
Helsinky • donwe31 • only4fun • Ciucciamelo • bramix • MOHAWK
Continut: Ascuns
Trebuie sa multumesti autorului pentru a putea vedea mesajul.
Afișează semnătura
Avatar utilizator
Asky
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 1472
Membru din: 08 Oct 2014, 17:32
Regat: Chunjo
Aprecieri: 98  
Mulţumiri: 4811  
Discord: Copiază ID
 Contact:
Medalii

ImbaSunHD scrie: ↑20 Iun 2020, 00:34 i have this error:

ClientManagerBoot.cpp:482:24: error: no member named 'wPriceVnum' in
'SShopItemTable'
str_to_number(pItem->wPriceVnum, data[col++]);
~~~~~ ^
ClientManagerBoot.cpp:483:24: error: no member named 'wPrice' in
'SShopItemTable'; did you mean 'price'?
str_to_number(pItem->wPrice, data[col++]);
^~~~~~
price
./../../common/tables.h:606:9: note: 'price' declared here
DWORD price; // PC, shop_table_ex.txt <BB><F3><C1>...
^
2 errors generated.


How Fix that ?

Clientmanangerboost.cpp:

bool CClientManager::InitializeShopTable()
{
MYSQL_ROW data;
int col;

static const char * s_szQuery =
"SELECT "
"shop.vnum, "
"shop.npc_vnum, "
"shop_item.item_vnum, "
"shop_item.count "
#ifdef ENABLE_MULTISHOP
",shop_item.price_vnum "
",shop_item.price "
#endif
"FROM shop LEFT JOIN shop_item "
"ON shop.vnum = shop_item.shop_vnum ORDER BY shop.vnum, shop_item.item_vnum";

std::auto_ptr<SQLMsg> pkMsg2(CDBManager::instance().DirectQuery(s_szQuery));
// std::auto_ptr<SQLMsg> pkMsg2(CDBManager::instance().DirectQuery(s_szQuery));

SQLResult * pRes2 = pkMsg2->Get();

if (!pRes2->uiNumRows)
{
sys_err("InitializeShopTable : Shop_item Darf nicht leer sein minimun 1 item");
return false;
}

std::map<int, TShopTable *> map_shop;

if (m_pShopTable)
{
delete [] (m_pShopTable);
m_pShopTable = NULL;
}

TShopTable * shop_table = m_pShopTable;

while ((data = mysql_fetch_row(pRes2->pSQLResult)))
{
col = 0;

int iShopVnum = 0;
str_to_number(iShopVnum, data[col++]);

if (map_shop.end() == map_shop.find(iShopVnum))
{
shop_table = new TShopTable;
memset(shop_table, 0, sizeof(TShopTable));
shop_table->dwVnum = iShopVnum;

map_shop[iShopVnum] = shop_table;
}
else
shop_table = map_shop[iShopVnum];

str_to_number(shop_table->dwNPCVnum, data[col++]);

if (!data[col]) // 아이템이 하나도 없으면 NULL이 리턴 되므로..
continue;

TShopItemTable * pItem = &shop_table->items[shop_table->byItemCount];

str_to_number(pItem->vnum, data[col++]);
str_to_number(pItem->count, data[col++]);
#ifdef ENABLE_MULTISHOP
str_to_number(pItem->wPriceVnum, data[col++]);
str_to_number(pItem->wPrice, data[col++]);
#endif

++shop_table->byItemCount;
}

m_pShopTable = new TShopTable[map_shop.size()];
m_iShopTableSize = map_shop.size();

auto it = map_shop.begin();

int i = 0;

while (it != map_shop.end())
{
thecore_memcpy((m_pShopTable + i), (it++)->second, sizeof(TShopTable));
sys_log(0, "SHOP: #%d items: %d", (m_pShopTable + i)->dwVnum, (m_pShopTable + i)->byItemCount);
++i;
}

return true;
}
Please put a spoiler
Imagine
Afișează semnătura
Avatar utilizator
emoemolizu
Nivel 3

Nivel 3
Mesaje: 487
Membru din: 20 Mar 2014, 13:37
Server: metin2aow
Regat: Jinno
Aprecieri: 91  
Mulţumiri: 6  
Discord: Copiază ID
 Contact:
Medalii

am un mic bug la acest sistem ( cand cumpar un item in loc de 1 yang imi ia 2 yang ) stie careva o rezolvare ?
Imagine
Ai nevoie de un site pentru afacerea ta? Intra pe www.ivmar.ro
Afișează semnătura
Avatar utilizator
kastor123
Nou Venit

Nou Venit
Mesaje: 25
Membru din: 19 Mai 2014, 10:41
Aprecieri: 409  
Mulţumiri: 1  
Medalii

COS. Link invalid
Avatar utilizator
[RaKu]
Membru Club

Membru Club
Mesaje: 2137
Membru din: 30 Noi 2016, 21:49
Regat: Jinno
Aprecieri: 202  
Mulţumiri: 424  
Discord: Copiază ID
Medalii

Athero scrie: ↑27 Iun 2019, 13:13
Continut: Ascuns
Trebuie sa multumesti autorului pentru a putea vedea mesajul.



VirusTotal : https://www.virustotal.com/gui/file/59c ... /detection

Imagine


Off: Sorry devs ca v-am luat painea de la gura, cine se simte ca vindea acest lucru ;)) ;))

[bbvideo=560,315]https://youtu.be/VM7ZfaJPxzQ[/bbvideo]
Link indisponibil. Ai la dispozitie 24 de ore sa pui link bun. Daca nu, va fi arhivat.
Pentru acest mesaj, [RaKu] a primit 7 (de) mulţumiri
AliaceOfficial • AdiArabu • only4fun • Ciucciamelo • CarazaGrigore • josh1000 • trixinek
Avatar utilizator
thomi
Nou Venit

Nou Venit
Mesaje: 40
Membru din: 12 Ian 2015, 21:28
Server: Nimic
Regat: Chunjo
Aprecieri: 174  
Mulţumiri: 7  
Discord: Copiază ID
Medalii

Link nou please, mister?
Închis

Înapoi la “Arhivă”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 7 vizitatori