Help... C++ Compile Erro

All Helbreath Server Source Discussion here.
Post Reply
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

2.24b Sources\Game.cpp(23981) : warning C4700: local variable 'cMapIndex' used without having been initialized

compile erro

give me code plz

binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

first off, thats a warning, not an error
it will still build
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

my server ver is 2.24b

4~5 hour playing

it server down
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

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

Shetar
Member
Posts: 148
Joined: Sun Nov 30, 2003 12:57 am

Post by Shetar »

The first 4: place a redifinition in front of the second value, to convert them to the first. Example:
*cp = (char)m_pClientList[iClientH]->m_iCharClass;
Number 5 is heldenian related and hbx never finished that, fix it by giving it a value just before it errors.
cMapIndex = 0;
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

thx

and 1 que

where put the code?
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

pTile = 0;
cMapIndex = 0;

is ok

thx thx

4 more..

*cp = (char)m_pClientList[iClientH]->m_iCharClass;


where put the code?
Shetar
Member
Posts: 148
Joined: Sun Nov 30, 2003 12:57 am

Post by Shetar »

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.
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

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
Shetar
Member
Posts: 148
Joined: Sun Nov 30, 2003 12:57 am

Post by Shetar »

If you can't even do what I told you, just leave those sources alone and never touch them again.

Those are warnings, they don't bother the running of your server.

Never Mind
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
choymin
noob
Posts: 23
Joined: Tue Apr 06, 2004 2:34 am

Post by choymin »

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
Shetar
Member
Posts: 148
Joined: Sun Nov 30, 2003 12:57 am

Post by Shetar »

Use your compiler to convert it to C++.

Sorry, I'm a lil busy atm to help people out..
Helbreath II Project Manager & All round Developer. <br><i>(Don't worry, we're not dead)</i>
Post Reply