Help... C++ Compile Erro
-
- DBfiller
- Posts: 3816
- Joined: Fri Oct 31, 2003 5:30 am
- Location: San Diego CA, USA
- Contact:
first off, thats a warning, not an error
it will still build
it will still build
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Game.cpp(2117) : warning C4305: '=' : truncation from 'const int' to 'char'
Game.cpp(2117) : warning C4309: '=' : truncation of constant value
Game.cpp(8859) : warning C4305: '=' : truncation from 'const int' to 'short'
Game.cpp(8859) : warning C4309: '=' : truncation of constant value
Game.cpp(23981) : warning C4700: local variable 'cMapIndex' used without having been initialized
5 files is warning
Game.cpp(2117) : warning C4309: '=' : truncation of constant value
Game.cpp(8859) : warning C4305: '=' : truncation from 'const int' to 'short'
Game.cpp(8859) : warning C4309: '=' : truncation of constant value
Game.cpp(23981) : warning C4700: local variable 'cMapIndex' used without having been initialized
5 files is warning
The first 4: place a redifinition in front of the second value, to convert them to the first. Example:
Number 5 is heldenian related and hbx never finished that, fix it by giving it a value just before it errors.*cp = (char)m_pClientList[iClientH]->m_iCharClass;
cMapIndex = 0;
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
Game.cpp(2117) : warning C4305: '=' : truncation from 'const int' to 'char'
Game.cpp(2117) : warning C4309: '=' : truncation of constant value
Game.cpp(8859) : warning C4305: '=' : truncation from 'const int' to 'short'
Game.cpp(8859) : warning C4309: '=' : truncation of constant value
-Find those strings (right mouse button, goto)
-Check the type of the first value (the one most left, which is being defined)
-Place the type of the left value before the right, like my previous example showed.. If the left type is char, place (char) in front of the right value.
Game.cpp(2117) : warning C4309: '=' : truncation of constant value
Game.cpp(8859) : warning C4305: '=' : truncation from 'const int' to 'short'
Game.cpp(8859) : warning C4309: '=' : truncation of constant value
-Find those strings (right mouse button, goto)
-Check the type of the first value (the one most left, which is being defined)
-Place the type of the left value before the right, like my previous example showed.. If the left type is char, place (char) in front of the right value.
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
thx reply but i can't find this
void CGame::RequestInitDataHandler(int iClientH, char * pData, char cKey)
{
char * pBuffer = NULL;
short * sp;
DWORD * dwp;
WORD * wp;
char * cp, cPlayerName[11], cTxt[120], sSummonPoints;
int * ip, i, iTotalItemA, iTotalItemB, iSize, iRet, iStats;
SYSTEMTIME SysTime;
if (m_pClientList[iClientH] == NULL) return;
//If the party is finished u have party-id = 0
if (m_pClientList[iClientH]->m_iPartyID != 0) {
m_pClientList[iClientH]->m_iPartyID = NULL;
GetPartyInfoHandler(iClientH);
}
pBuffer = new char [DEF_MSGBUFFERSIZE+1];
ZeroMemory(pBuffer, DEF_MSGBUFFERSIZE+1);
where put the code
void CGame::RequestInitDataHandler(int iClientH, char * pData, char cKey)
{
char * pBuffer = NULL;
short * sp;
DWORD * dwp;
WORD * wp;
char * cp, cPlayerName[11], cTxt[120], sSummonPoints;
int * ip, i, iTotalItemA, iTotalItemB, iSize, iRet, iStats;
SYSTEMTIME SysTime;
if (m_pClientList[iClientH] == NULL) return;
//If the party is finished u have party-id = 0
if (m_pClientList[iClientH]->m_iPartyID != 0) {
m_pClientList[iClientH]->m_iPartyID = NULL;
GetPartyInfoHandler(iClientH);
}
pBuffer = new char [DEF_MSGBUFFERSIZE+1];
ZeroMemory(pBuffer, DEF_MSGBUFFERSIZE+1);
where put the code
yes
leav them
but
my server is down
down and down and down
erro address
HGSERVER! 004af9f0() 0F BF 82 1C 0C 00 00 movsx eax,word ptr [edx+0C1Ch]
HGSERVER! 004b327a() 0F BE 8D 24 FF FF FF movsx ecx,byte ptr [ebp-0DCh]
HGSERVER! 00425269() 8B 55 08 mov edx,dword ptr [ebp+8]
HGSERVER! 0041fe11() EB 0C jmp 0041FE1F
HGSERVER! 00410d94() 8B 4D FC mov ecx,dword ptr [ebp-4]
HGSERVER! 0049cc82() 8B 45 F0 mov eax,dword ptr [ebp-10h]
HGSERVER! 004c0bf4() E9 ED 00 00 00 jmp 004C0CE6
USER32! 77dfc3b7() 64 8B 0D 18 00 00 00 mov ecx,dword ptr fs:[18h]
USER32! 77dfc484() 89 45 E4 mov dword ptr [ebp-1Ch],eax
USER32! 77dfc73c() 8B 0D B8 24 E4 77 mov ecx,dword ptr ds:[77E424B8h]
USER32! 77dee406() 5D pop ebp
HGSERVER! 004c0ef5() E8 76 03 00 00 call 004C1270
HGSERVER! 004c0d55() 33 C0 xor eax,eax
HGSERVER! 004c57b6() 89 45 A0 mov dword ptr [ebp-60h],eax
KERNEL32! 7c8123cd() 50 push eax
i give up
help me plz
want souce? i'll give you
leav them
but
my server is down
down and down and down
erro address
HGSERVER! 004af9f0() 0F BF 82 1C 0C 00 00 movsx eax,word ptr [edx+0C1Ch]
HGSERVER! 004b327a() 0F BE 8D 24 FF FF FF movsx ecx,byte ptr [ebp-0DCh]
HGSERVER! 00425269() 8B 55 08 mov edx,dword ptr [ebp+8]
HGSERVER! 0041fe11() EB 0C jmp 0041FE1F
HGSERVER! 00410d94() 8B 4D FC mov ecx,dword ptr [ebp-4]
HGSERVER! 0049cc82() 8B 45 F0 mov eax,dword ptr [ebp-10h]
HGSERVER! 004c0bf4() E9 ED 00 00 00 jmp 004C0CE6
USER32! 77dfc3b7() 64 8B 0D 18 00 00 00 mov ecx,dword ptr fs:[18h]
USER32! 77dfc484() 89 45 E4 mov dword ptr [ebp-1Ch],eax
USER32! 77dfc73c() 8B 0D B8 24 E4 77 mov ecx,dword ptr ds:[77E424B8h]
USER32! 77dee406() 5D pop ebp
HGSERVER! 004c0ef5() E8 76 03 00 00 call 004C1270
HGSERVER! 004c0d55() 33 C0 xor eax,eax
HGSERVER! 004c57b6() 89 45 A0 mov dword ptr [ebp-60h],eax
KERNEL32! 7c8123cd() 50 push eax
i give up
help me plz
want souce? i'll give you