Jump to content
×
×
  • Create New...
  • 0

Compilation


iryzz

Question

Hellow 

 

j'ai modifier le systeme des pets et quand je compile le game j'ai le droit a sa

 OG.PNG.351f4f5a1a6a91aee93ae732b111aa8f.PNG

 

et je sais pas trop comment resoudre ce probleme si quelqu'un peux m'éclairer  :)

 

Merci d'avance

 

Edit : maintenant j'ai sa 

 

compile acce.cpp

compile BattleArena.cpp

compile MarkConvert.cpp

compile MarkImage.cpp

compile MarkManager.cpp

compile OXEvent.cpp

compile TrafficProfiler.cpp

compile ani.cpp

compile arena.cpp

compile banword.cpp

compile battle.cpp

compile blend_item.cpp

compile block_country.cpp

compile buffer_manager.cpp

compile building.cpp

compile castle.cpp

compile char.cpp

compile char_affect.cpp

compile char_battle.cpp

compile char_change_empire.cpp

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from block_country.cpp:10:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from buffer_manager.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from TrafficProfiler.cpp:10:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from blend_item.cpp:10:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from MarkConvert.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from MarkManager.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from MarkImage.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from acce.cpp:7:

char.h:750: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from acce.cpp:2:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from ani.cpp:11:

char.h:750: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from ani.cpp:10:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

acce.cpp: In function 'void FN_remove_material(CItem**, DWORD, int, int)':

acce.cpp:87: warning: unused variable 'count'

acce.cpp: In function 'bool Acce_InformationInitialize()':

acce.cpp:943: warning: comparison between signed and unsigned integer expressions

In file included from cipher.h:6,

                 from desc.h:7,

                 from arena.cpp:5:

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type

In file included from arena.cpp:9:

char.h:750: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from arena.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from cipher.h:6,

                 from desc.h:7,

                 from arena.cpp:5:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

arena.cpp: In function 'long int ready_to_start_event(LPEVENT, long int)':

arena.cpp:327: warning: overflow in implicit constant conversion

arena.cpp:328: warning: overflow in implicit constant conversion

In file included from OXEvent.cpp:9:

char.h:750: error: integer constant is too large for 'long' type

In file included from char_change_empire.cpp:4:

char.h:750: error: integer constant is too large for 'long' type

In file included from char_affect.cpp:5:

char.h:750: error: integer constant is too large for 'long' type

In file included from char.cpp:6:

char.h:750: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from banword.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from building.cpp:8:

char.h:750: error: integer constant is too large for 'long' type

In file included from BattleArena.cpp:6:

char.h:750: error: integer constant is too large for 'long' type

In file included from castle.cpp:21:

char.h:750: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from castle.cpp:12:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsiged int') as first parameter

In file included from cipher.h:6,

                 from desc.h:7,

                 from char_battle.cpp:4:

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type

In file included from cipher.h:6,

                 from desc.h:7,

                 from battle.cpp:4:

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too  arge for 'long' type

gmake: *** [Makefile:130: OBJDIR/ani.o] Error 1

gmake: *** Waiting for unfinished jobs....

gmake: *** [Makefile:130: OBJDIR/acce.o] Error 1

In file included from battle.h:4,

                 from char_battle.cpp:10:

char.h:750: error: integer constant is too large for 'long' type

In file included from battle.cpp:5:

char.h:750: error: integer constant is too large for 'long' type

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from OXEvent.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from cipher.h:6,

                 from desc.h:7,

                 from desc_client.h:4,

                 from char_affect.cpp:10:

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from BattleArena.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from battle.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from cipher.h:6,

                 from desc.h:7,

                 from desc_client.h:4,

                 from char.cpp:12:

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from char_change_empire.cpp:2:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from char_battle.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from cipher.h:6,

                 from desc.h:7,

                 from char_battle.cpp:4:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

char.cpp:7355: warning: this decimal constant is unsigned only in ISO C90

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from char.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from char_affect.cpp:2:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

In file included from cipher.h:6,

                 from desc.h:7,

                 from building.cpp:12:

../../../Extern/include/cryptopp/cryptlib.h:96: error: integer constant is too large for 'long' type

gmake: *** [Makefile:130: OBJDIR/char_battle.o] Error 1

In file included from debug_allocator.h:5,

                 from stdafx.h:7,

                 from building.cpp:1:

/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter

gmake: *** [Makefile:130: OBJDIR/blend_item.o] Error 1

gmake: *** [Makefile:130: OBJDIR/MarkConvert.o] Error 1

gmake: *** [Makefile:130: OBJDIR/block_country.o] Error 1

gmake: *** [Makefile:130: OBJDIR/buffer_manager.o] Error 1

gmake: *** [Makefile:130: OBJDIR/TrafficProfiler.o] Error 1

In file included from cipher.h:6,

                 from desc.h:7,

                 from battle.cpp:4:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

gmake: *** [Makefile:130: OBJDIR/MarkImage.o] Error 1

gmake: *** [Makefile:130: OBJDIR/MarkManager.o] Error 1

In file included from cipher.h:6,

                 from desc.h:7,

                 from desc_client.h:4,

                 from char.cpp:12:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

gmake: *** [Makefile:130: OBJDIR/char_change_empire.o] Error 1

In file included from cipher.h:6,

                 from desc.h:7,

                 from desc_client.h:4,

                 from char_affect.cpp:10:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

banword.cpp: In member function 'bool CBanwordManager::Initialize(TBanwordTable*, WORD)':

banword.cpp:24: warning: format '%zu' expects type 'size_t', but argument 4 has type 'size_t'

gmake: *** [Makefile:130: OBJDIR/char_affect.o] Error 1

gmake: *** [Makefile:130: OBJDIR/banword.o] Error 1

In file included from cipher.h:6,

                 from desc.h:7,

                 from OXEvent.cpp:12:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

gmake: *** [Makefile:130: OBJDIR/BattleArena.o] Error 1

gmake: *** [Makefile:130: OBJDIR/castle.o] Error 1

In file included from cipher.h:6,

                 from desc.h:7,

                 from building.cpp:12:

../../../Extern/include/cryptopp/cryptlib.h:96: warning: large integer implicitly truncated to unsigned type

gmake: *** [Makefile:130: OBJDIR/battle.o] Error 1

OXEvent.cpp: In member function 'void COXEventManager::WarpToAudience()':

OXEvent.cpp:375: warning: overflow in implicit constant conversion

OXEvent.cpp:376: warning: overflow in implicit constant conversion

OXEvent.cpp:377: warning: overflow in implicit constant conversion

OXEvent.cpp:378: warning: overflow in implicit constant conversion

OXEvent.cpp:379: warning: overflow in implicit constant conversion

gmake: *** [Makefile:130: OBJDIR/OXEvent.o] Error 1

char.cpp: In member function 'void::FuncCheckWarp::operator()(CEntity*)':

char.cpp:6533: warning: overflow in implicit constant conversion

gmake: *** [Makefile:130: OBJDIR/building.o] Error 1

gmake: *** [Makefile:130: OBJDIR/char.o] Error 1

 

En postant ma demande d'aide, j'affirme avoir lu et accepté le règlement des demandes d'aides.[Message d'introduction]

Link to comment
  • Answers 12
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

12 answers to this question

Recommended Posts

  • 0

for (int x = 0; x < 3; ++x) //Inizializzazione bonus del pet

{

int btype[3] = { 1, 15, 17};

m_dwbonuspet[x][0] = btype[x];

m_dwbonuspet[x][1] = 0;

}

 

 

et j'ai mis sa a la place 

 

for (int x = 0; x < 3; ++x) //Inizializzazione bonus del pet

{

int btype[3] = { 1, 2, 54};

m_dwbonuspet[x][0] = btype[x];

m_dwbonuspet[x][1] = 0;

}

Link to comment
  • 0

je peux trouver sa ou

 

Pour la réponse je dirai : devant la déclaration de la variable (ex : int i : variable de type entière (int) qui se nomme "i").

 

Je veux pas paraître mauvaise langue ou quoi, mais je pense qu'une petite initiation aux langages typés te ferait du bien ! En gros concidère que chaque variable prenne une taille fix en mémoire, et comme le C++ est fait pour être fortement typé, si tu prends un int et que tu essaie de le rentrer par exemple dans un char (là je parle pour l'initializer list du C++11) tu auras ce que l'on appel un narrowing !

Link to comment
  • 0

Hellow, 

 

int m_dwbonuspet[3][2];

 

 

 

void CNewPetActor:: IncreasePetBonus() {

int tmplevel = GetLevel();

if (tmplevel % 5 == 0) {

m_dwbonuspet[0][1] += number(1, 6);

 

}

if (tmplevel % 7 == 0) {

m_dwbonuspet[1][1] += number(1, 6);

}

if (tmplevel % 4 == 0) {

m_dwbonuspet[2][1] += number(1, 6);

}

m_pkOwner->ChatPacket(CHAT_TYPE_COMMAND, "PetBonus %d %d %d", m_dwbonuspet[0][1], m_dwbonuspet[1][1], m_dwbonuspet[2][1]);

LPITEM pSummonItem = ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID());

if (pSummonItem != NULL){

for (int b = 0; b < 3; b++){

pSummonItem->SetForceAttribute(b, 1, m_dwbonuspet[1]);

 

Pour la réponse je dirai : devant la déclaration de la variable (ex : int i : variable de type entière (int) qui se nomme "i").

 

Je veux pas paraître mauvaise langue ou quoi, mais je pense qu'une petite initiation aux langages typés te ferait du bien ! En gros concidère que chaque variable prenne une taille fix en mémoire, et comme le C++ est fait pour être fortement typé, si tu prends un int et que tu essaie de le rentrer par exemple dans un char (là je parle pour l'initializer list du C++11) tu auras ce que l'on appel un narrowing !

Oui je sais mais je sais pas a quelle langue m'attaquer yen as tlm  :hap: :hap: :hap:

après je comprend bien que je ne dois pas mettre du texte dans une variable int xD

et j'ai vue que la compilation en 64 bits c’était pas du gâteau donc je vais passer en 32 bits pour voir si sa passe parce-que quand tu regarde en fin de compte les erreur vienne pas du pets système  :surprised:

Link to comment
Guest
This topic is now closed to further replies.


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.