Dice System - Eroare Compilare

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
TiTAN1080p
Nivel 4

Nivel 4
Mesaje: 576
Membru din: 22 Sep 2013, 19:36
Server: Colossus-MMO
Regat: Chunjo
Aprecieri: 17  
Mulţumiri: 15  
Discord: Copiază ID
 Contact:
Medalii

Descriere problema: Salut, ma bate eroarea asta de dimineata:
exchange.cpp: In member function 'bool CExchange::AddCheque(int)':
exchange.cpp:458:79: error: too few arguments to function 'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*)'
exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_LESS_CHEQUE, 0, 0, NPOS, 0);
^
exchange.cpp:34:6: note: declared here
void exchange_packet(LPCHARACTER ch, BYTE sub_header, bool is_me, DWORD arg1, TItemPos arg2, DWORD arg3, BYTE dice, void * pvData)
^
exchange.cpp:470:88: error: too few arguments to function 'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*)'
exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_CHEQUE_ADD, true, m_bCheque, NPOS, 0);
Sistemul folosit este cel postat aici pe forum.
Avatar utilizator
Athero
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 3936
Membru din: 17 Aug 2017, 00:08
Aprecieri: 559  
Mulţumiri: 7142  
Discord: Copiază ID
Medalii

Din ce vad ai won pe server.
Ai grija ca in exchange.cpp trebuie sa dai multe replace-uri si unele posibil as nu se pupe cu wonii, asa ca nu mai da replace si baga de mana acele functii.
//retras
Afișează semnătura
Avatar utilizator
Maruski
Membru Club

Membru Club
Mesaje: 443
Membru din: 21 Oct 2015, 13:54
Aprecieri: 114  
Mulţumiri: 346  
Medalii

TiTAN1080p scrie: ↑16 Apr 2020, 01:49 Descriere problema: Salut, ma bate eroarea asta de dimineata:
exchange.cpp: In member function 'bool CExchange::AddCheque(int)':
exchange.cpp:458:79: error: too few arguments to function 'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*)'
exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_LESS_CHEQUE, 0, 0, NPOS, 0);
^
exchange.cpp:34:6: note: declared here
void exchange_packet(LPCHARACTER ch, BYTE sub_header, bool is_me, DWORD arg1, TItemPos arg2, DWORD arg3, BYTE dice, void * pvData)
^
exchange.cpp:470:88: error: too few arguments to function 'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*)'
exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_CHEQUE_ADD, true, m_bCheque, NPOS, 0);
Sistemul folosit este cel postat aici pe forum.
'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*'

Hum, adauga parametrul m_lDice sau dice aici: exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_LESS_CHEQUE, 0, 0, NPOS, 0, dice); si linia 470.
Ultima oară modificat 16 Apr 2020, 02:26 de către Maruski, modificat 1 dată în total.
Avatar utilizator
TiTAN1080p
Nivel 4

Nivel 4
Mesaje: 576
Membru din: 22 Sep 2013, 19:36
Server: Colossus-MMO
Regat: Chunjo
Aprecieri: 17  
Mulţumiri: 15  
Discord: Copiază ID
 Contact:
Medalii

Athero scrie: ↑16 Apr 2020, 02:07 Din ce vad ai won pe server.
Ai grija ca in exchange.cpp trebuie sa dai multe replace-uri si unele posibil as nu se pupe cu wonii, asa ca nu mai da replace si baga de mana acele functii.
Pai acolo ma bate...

exchange.cpp:34:129: error: two or more data types in declaration of 'pvData'
void exchange_packet(LPCHARACTER ch, BYTE sub_header, bool is_me, DWORD arg1, TItemPos arg2, DWORD arg3, BYTE dice, void void * pvData)
^
exchange.cpp: In function 'void exchange_packet(...)':
exchange.cpp:36:7: error: 'ch' was not declared in this scope
if (!ch->GetDesc())
Maruski scrie: ↑16 Apr 2020, 02:12
TiTAN1080p scrie: ↑16 Apr 2020, 01:49 Descriere problema: Salut, ma bate eroarea asta de dimineata:
exchange.cpp: In member function 'bool CExchange::AddCheque(int)':
exchange.cpp:458:79: error: too few arguments to function 'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*)'
exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_LESS_CHEQUE, 0, 0, NPOS, 0);
^
exchange.cpp:34:6: note: declared here
void exchange_packet(LPCHARACTER ch, BYTE sub_header, bool is_me, DWORD arg1, TItemPos arg2, DWORD arg3, BYTE dice, void * pvData)
^
exchange.cpp:470:88: error: too few arguments to function 'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*)'
exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_CHEQUE_ADD, true, m_bCheque, NPOS, 0);
Sistemul folosit este cel postat aici pe forum.
'void exchange_packet(LPCHARACTER, BYTE, bool, DWORD, TItemPos, DWORD, BYTE, void*'

Hum, adauga parametrul m_lDice sau dice aici: exchange_packet(GetOwner(), EXCHANGE_SUBHEADER_GC_LESS_CHEQUE, 0, 0, NPOS, 0, dice); si linia 470.
L-ai impuscat

exchange.cpp:34:129: error: two or more data types in declaration of 'pvData'
void exchange_packet(LPCHARACTER ch, BYTE sub_header, bool is_me, DWORD arg1, TItemPos arg2, DWORD arg3, BYTE dice, void void * pvData)
^
exchange.cpp: In function 'void exchange_packet(...)':
exchange.cpp:36:7: error: 'ch' was not declared in this scope
if (!ch->GetDesc())
^
exchange.cpp:42:27: error: 'sub_header' was not declared in this scope
pack_exchg.sub_header = sub_header;
^
exchange.cpp:43:22: error: 'is_me' was not declared in this scope
pack_exchg.is_me = is_me;
^
exchange.cpp:44:21: error: 'arg1' was not declared in this scope
pack_exchg.arg1 = arg1;
^
exchange.cpp:45:21: error: 'arg2' was not declared in this scope
pack_exchg.arg2 = arg2;
^
exchange.cpp:46:21: error: 'arg3' was not declared in this scope
pack_exchg.arg3 = arg3;
^
exchange.cpp:47:19: error: invalid conversion from 'int (*)(int, int)' to 'BYTE {aka unsigned char}' [-fpermissive]
pack_exchg.dice = dice;
^
exchange.cpp:49:54: error: 'pvData' was not declared in this scope
if (sub_header == EXCHANGE_SUBHEADER_GC_ITEM_ADD && pvData)
^
exchange.cpp:74:2: error: 'ch' was not declared in this scope
ch->GetDesc()->Packet(&pack_exchg, sizeof(pack_exchg));
^
exchange.cpp: In member function 'bool CExchange::Accept(bool)':
exchange.cpp:987:2: error: expected '}' before 'else'
else
^
^
Avatar utilizator
TiTAN1080p
Nivel 4

Nivel 4
Mesaje: 576
Membru din: 22 Sep 2013, 19:36
Server: Colossus-MMO
Regat: Chunjo
Aprecieri: 17  
Mulţumiri: 15  
Discord: Copiază ID
 Contact:
Medalii

UP?
Ma poate ajuta cineva cu asta?
exchange.cpp: In member function 'bool CExchange::Accept(bool)':
exchange.cpp:986:3: error: expected '}' before 'else'
else
^
exchange.cpp:997:1: error: a function-definition is not allowed here before '{' token
{
^
exchange.cpp:1014:1: error: expected '}' at end of input
}
^
Multumesc anticipat
Avatar utilizator
TiTAN1080p
Nivel 4

Nivel 4
Mesaje: 576
Membru din: 22 Sep 2013, 19:36
Server: Colossus-MMO
Regat: Chunjo
Aprecieri: 17  
Mulţumiri: 15  
Discord: Copiază ID
 Contact:
Medalii

Edit: REZOLVAT.
Multumesc @Maruski pentru suportul acordat.
Avatar utilizator
Ionuţ M.
Metin Master

Metin Master
Mesaje: 2680
Membru din: 28 Noi 2015, 22:02
Aprecieri: 170  
Mulţumiri: 12723  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Arhivat.
Imagine
Afișează semnătura
Închis

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

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