Intrebare fix

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
[Servoo-Directie]
Nivel 1

Nivel 1
Mesaje: 71
Membru din: 06 Apr 2020, 18:59
Server: www.mpower2.ro
Regat: Shinsoo
Aprecieri: 50  
Mulţumiri: 0
Discord: Copiază ID
Medalii

Jahen. scrie: ↑09 Mai 2020, 18:51 E asa greu sa le deschizi pe toate cu notepad++ si a dai search? Modifica in char_affect.cpp ceea ce a spus Cr3zy.
am facut ce a spus, si uite ce imi apare cand compilez sursa

Cod: Selectaţi tot

char_affect.cpp:676: error: prototype for 'bool CHARACTER::RemoveAffect(CAffect*)' does not match any in class 'CHARACTER'
char.h:988: error: candidates are: bool CHARACTER::RemoveAffect(CAffect*, bool)
char.h:969: error:                 bool CHARACTER::RemoveAffect(DWORD)
char_affect.cpp: In member function 'bool CHARACTER::RemoveAffect(DWORD)':
char_affect.cpp:730: error: call of overloaded 'RemoveAffect(CAffect*&)' is ambiguous
char_affect.cpp:715: note: candidates are: bool CHARACTER::RemoveAffect(DWORD) <near match>
char.h:988: note:                 bool CHARACTER::RemoveAffect(CAffect*, bool)
char_affect.cpp:676: note:                 bool CHARACTER::RemoveAffect(CAffect*)
char_affect.cpp: In member function 'void CHARACTER::RemoveGoodAffect()':
char_affect.cpp:744: error: 'GoodAffects' was not declared in this scope
char_affect.cpp:744: error: invalid type in declaration before '=' token
char_affect.cpp:746: error: invalid type argument of 'unary *'
char_affect.cpp: In member function 'void CHARACTER::RemoveBadAffect()':
char_affect.cpp:788: error: 'BadAffects' was not declared in this scope
char_affect.cpp:788: error: invalid type in declaration before '=' token
char_affect.cpp:790: error: invalid type argument of 'unary *'
gmake: *** [.obj/char_affect.o] Error 1
gmake: *** Waiting for unfinished jobs....
Avatar utilizator
Cr3zy
Nivel 2

Nivel 2
Mesaje: 237
Membru din: 26 Sep 2016, 17:26
Aprecieri: 35  
Mulţumiri: 60  
Medalii

fa tut ala pe care l-ai dat si in loc de functiile alea RemoveGoodAffect si RemoveBadAffect pui ce ti-am dat eu, ii asa de greu?
Avatar utilizator
[Servoo-Directie]
Nivel 1

Nivel 1
Mesaje: 71
Membru din: 06 Apr 2020, 18:59
Server: www.mpower2.ro
Regat: Shinsoo
Aprecieri: 50  
Mulţumiri: 0
Discord: Copiază ID
Medalii

Cr3zy scrie: ↑09 Mai 2020, 20:24 fa tut ala pe care l-ai dat si in loc de functiile alea RemoveGoodAffect si RemoveBadAffect pui ce ti-am dat eu, ii asa de greu?
FIX ASA AM FACUT, ACEASI TREABA
UITE CHHAR AFECT POATE GRESESC EU CEVA

Avatar utilizator
Jahen.
Utilizator interzis !

Utilizator interzis !
Mesaje: 86
Membru din: 03 Apr 2020, 18:45
Aprecieri: 104  
Mulţumiri: 200  
Medalii

Ai nevoie de c++11.

Cum instalezi c++11?

Pentru început, adaugă

Cod: Selectaţi tot

 -std=c++11
în fișierul tău de verificare a fișierelor din sursă.
Acum, deschide fiecare fișier în parte .cpp și .h din sursă și modifică TOT ce ține de:

Cod: Selectaţi tot

typeof
în

Cod: Selectaţi tot

__typeof
iar ce ține de

Cod: Selectaţi tot

auto_ptr
în

Cod: Selectaţi tot

unique_ptr
Ai grijă, s-ar putea să apară probleme dacă folosești o versiune de g++ mai veche de 48 sau 49, din câte știu, s-ar putea să nu îți meargă pe 48. Spor!
Avatar utilizator
Cr3zy
Nivel 2

Nivel 2
Mesaje: 237
Membru din: 26 Sep 2016, 17:26
Aprecieri: 35  
Mulţumiri: 60  
Medalii

[Servoo-Directie] scrie: ↑09 Mai 2020, 21:13
Cr3zy scrie: ↑09 Mai 2020, 20:24 fa tut ala pe care l-ai dat si in loc de functiile alea RemoveGoodAffect si RemoveBadAffect pui ce ti-am dat eu, ii asa de greu?
FIX ASA AM FACUT, ACEASI TREABA
UITE CHHAR AFECT POATE GRESESC EU CEVA

cauta

Cod: Selectaţi tot

RemoveAffect(CAffect * pkAff, bool single)
in char.h si inlocuieste cu

Cod: Selectaţi tot

RemoveAffect(CAffect * pkAff, bool single);
si inlocuieste char_affect.cpp cu asta
ps tut pe care l-ai dat era incomplet..
Avatar utilizator
[Servoo-Directie]
Nivel 1

Nivel 1
Mesaje: 71
Membru din: 06 Apr 2020, 18:59
Server: www.mpower2.ro
Regat: Shinsoo
Aprecieri: 50  
Mulţumiri: 0
Discord: Copiază ID
Medalii

char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from OXEvent.cpp:9:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/ani.o] Error 1
In file included from input.h:7,
from desc.h:5,
from arena.cpp:5:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from char.cpp:6:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from char_affect.cpp:5:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from castle.cpp:21:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/damage_top.o] Error 1
In file included from input.h:7,
from desc.h:5,
from battle.cpp:4:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from building.cpp:8:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/OXEvent.o] Error 1
In file included from input.h:7,
from desc.h:5,
from char_battle.cpp:4:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/castle.o] Error 1
char_affect.cpp:676: error: prototype for 'bool CHARACTER::RemoveAffect(CAffect*, bool)' does not match any in class 'CHARACTER'
char.h:988: error: candidates are: int CHARACTER::RemoveAffect(CAffect*, bool)
char.h:969: error: bool CHARACTER::RemoveAffect(DWORD)
char_affect.cpp:676: error: 'bool CHARACTER::RemoveAffect(CAffect*, bool)' cannot be overloaded
char.h:988: error: with 'int CHARACTER::RemoveAffect(CAffect*, bool)'
char_affect.cpp:791: error: scalar object 'GoodAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveGoodAffect()':
char_affect.cpp:795: error: invalid type in declaration before '=' token
char_affect.cpp:797: error: invalid type argument of 'unary *'
char_affect.cpp: At global scope:
char_affect.cpp:844: error: scalar object 'BadAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveBadAffect()':
char_affect.cpp:848: error: invalid type in declaration before '=' token
char_affect.cpp:850: error: invalid type argument of 'unary *'
gmake: *** [.obj/inventory_protect.o] Error 1
gmake: *** [.obj/char_affect.o] Error 1
gmake: *** [.obj/arena.o] Error 1
gmake: *** [.obj/battle.o] Error 1
gmake: *** [.obj/building.o] Error 1
gmake: *** [.obj/char_battle.o] Error 1
gmake: *** [.obj/char.o] Error 1



uite ce apare acu
Avatar utilizator
Cr3zy
Nivel 2

Nivel 2
Mesaje: 237
Membru din: 26 Sep 2016, 17:26
Aprecieri: 35  
Mulţumiri: 60  
Medalii

[Servoo-Directie] scrie: ↑09 Mai 2020, 22:35 char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from OXEvent.cpp:9:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/ani.o] Error 1
In file included from input.h:7,
from desc.h:5,
from arena.cpp:5:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from char.cpp:6:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from char_affect.cpp:5:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from castle.cpp:21:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/damage_top.o] Error 1
In file included from input.h:7,
from desc.h:5,
from battle.cpp:4:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from building.cpp:8:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/OXEvent.o] Error 1
In file included from input.h:7,
from desc.h:5,
from char_battle.cpp:4:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/castle.o] Error 1
char_affect.cpp:676: error: prototype for 'bool CHARACTER::RemoveAffect(CAffect*, bool)' does not match any in class 'CHARACTER'
char.h:988: error: candidates are: int CHARACTER::RemoveAffect(CAffect*, bool)
char.h:969: error: bool CHARACTER::RemoveAffect(DWORD)
char_affect.cpp:676: error: 'bool CHARACTER::RemoveAffect(CAffect*, bool)' cannot be overloaded
char.h:988: error: with 'int CHARACTER::RemoveAffect(CAffect*, bool)'
char_affect.cpp:791: error: scalar object 'GoodAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveGoodAffect()':
char_affect.cpp:795: error: invalid type in declaration before '=' token
char_affect.cpp:797: error: invalid type argument of 'unary *'
char_affect.cpp: At global scope:
char_affect.cpp:844: error: scalar object 'BadAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveBadAffect()':
char_affect.cpp:848: error: invalid type in declaration before '=' token
char_affect.cpp:850: error: invalid type argument of 'unary *'
gmake: *** [.obj/inventory_protect.o] Error 1
gmake: *** [.obj/char_affect.o] Error 1
gmake: *** [.obj/arena.o] Error 1
gmake: *** [.obj/battle.o] Error 1
gmake: *** [.obj/building.o] Error 1
gmake: *** [.obj/char_battle.o] Error 1
gmake: *** [.obj/char.o] Error 1



uite ce apare acu
asa trb sa arate in char.h https://prnt.sc/se1sb3 tu ai sters si bool...
Avatar utilizator
[Servoo-Directie]
Nivel 1

Nivel 1
Mesaje: 71
Membru din: 06 Apr 2020, 18:59
Server: www.mpower2.ro
Regat: Shinsoo
Aprecieri: 50  
Mulţumiri: 0
Discord: Copiază ID
Medalii

Cr3zy scrie: ↑10 Mai 2020, 09:27
[Servoo-Directie] scrie: ↑09 Mai 2020, 22:35 char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from OXEvent.cpp:9:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/ani.o] Error 1
In file included from input.h:7,
from desc.h:5,
from arena.cpp:5:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from char.cpp:6:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from char_affect.cpp:5:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from castle.cpp:21:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/damage_top.o] Error 1
In file included from input.h:7,
from desc.h:5,
from battle.cpp:4:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
In file included from building.cpp:8:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/OXEvent.o] Error 1
In file included from input.h:7,
from desc.h:5,
from char_battle.cpp:4:
char.h:988: error: ISO C++ forbids declaration of 'RemoveAffect' with no type
gmake: *** [.obj/castle.o] Error 1
char_affect.cpp:676: error: prototype for 'bool CHARACTER::RemoveAffect(CAffect*, bool)' does not match any in class 'CHARACTER'
char.h:988: error: candidates are: int CHARACTER::RemoveAffect(CAffect*, bool)
char.h:969: error: bool CHARACTER::RemoveAffect(DWORD)
char_affect.cpp:676: error: 'bool CHARACTER::RemoveAffect(CAffect*, bool)' cannot be overloaded
char.h:988: error: with 'int CHARACTER::RemoveAffect(CAffect*, bool)'
char_affect.cpp:791: error: scalar object 'GoodAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveGoodAffect()':
char_affect.cpp:795: error: invalid type in declaration before '=' token
char_affect.cpp:797: error: invalid type argument of 'unary *'
char_affect.cpp: At global scope:
char_affect.cpp:844: error: scalar object 'BadAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveBadAffect()':
char_affect.cpp:848: error: invalid type in declaration before '=' token
char_affect.cpp:850: error: invalid type argument of 'unary *'
gmake: *** [.obj/inventory_protect.o] Error 1
gmake: *** [.obj/char_affect.o] Error 1
gmake: *** [.obj/arena.o] Error 1
gmake: *** [.obj/battle.o] Error 1
gmake: *** [.obj/building.o] Error 1
gmake: *** [.obj/char_battle.o] Error 1
gmake: *** [.obj/char.o] Error 1



uite ce apare acu
asa trb sa arate in char.h https://prnt.sc/se1sb3 tu ai sters si bool...

Salut, sefule.
Am pus char_affectul pus de tine, am modificat si in char.h fix ca in poza, iar acum apare asta... :ymtongue:

Cod: Selectaţi tot

char_affect.cpp:791: error: scalar object 'GoodAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveGoodAffect()':
char_affect.cpp:795: error: invalid type in declaration before '=' token
char_affect.cpp:797: error: invalid type argument of 'unary *'
char_affect.cpp: At global scope:
char_affect.cpp:844: error: scalar object 'BadAffects' requires one element in initializer
char_affect.cpp: In member function 'void CHARACTER::RemoveBadAffect()':
char_affect.cpp:848: error: invalid type in declaration before '=' token
char_affect.cpp:850: error: invalid type argument of 'unary *'
Avatar utilizator
Cr3zy
Nivel 2

Nivel 2
Mesaje: 237
Membru din: 26 Sep 2016, 17:26
Aprecieri: 35  
Mulţumiri: 60  
Medalii

da-mi team viewer in pm si o rezolv
Avatar utilizator
[Servoo-Directie]
Nivel 1

Nivel 1
Mesaje: 71
Membru din: 06 Apr 2020, 18:59
Server: www.mpower2.ro
Regat: Shinsoo
Aprecieri: 50  
Mulţumiri: 0
Discord: Copiază ID
Medalii

Cr3zy scrie: ↑10 Mai 2020, 12:37 da-mi team viewer in pm si o rezolv
ti-am dat mesaj
Închis
Răspunsuri
2
Vizualizări
436
Răspunsuri
1
Vizualizări
215
Răspunsuri
5
Vizualizări
620

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

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