All Helbreath Server Source Discussion here.
-
xmukox
- Member
- Posts: 175
- Joined: Sun Sep 11, 2005 9:53 am
Post
by xmukox »
hello i have questions what's wrong with that code:
Code: Select all
C:\...\HGServer 2.24c\Game.cpp(9861) : error C2601: 'ChatMsgHandlerGSM' : local function definitions are illegal
C:\...\HGServer 2.24c\Game.cpp(9861) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Code: Select all
void CGame::ChatMsgHandlerGSM(int iMsgType, int iV1, char * pName, char * pData, DWORD dwMsgSize)
{ <-- its that error.
register int i, iRet;
DWORD * dwp;
WORD * wp;
short * sp;
char * cp, cTemp[256], cSendMode = NULL;
ZeroMemory(cTemp, sizeof(cTemp));
dwp = (DWORD *)cTemp;
*dwp = MSGID_COMMAND_CHATMSG;
wp = (WORD *)(cTemp + DEF_INDEX2_MSGTYPE);
*wp = NULL;
cp = (char *)(cTemp + DEF_INDEX2_MSGTYPE + 2);
sp = (short *)cp;
*sp = NULL;
cp += 2;
sp = (short *)cp;
*sp = NULL;
cp += 2;
memcpy(cp, pName, 10);
cp += 10;
*cp = (char)iMsgType;
cp++;
memcpy(cp, pData, dwMsgSize);
cp += dwMsgSize;
switch (iMsgType) {
case 1:
for (i = 1; i < DEF_MAXCLIENTS; i++)
if (m_pClientList[i] != NULL) {
if (m_pClientList[i]->m_bIsInitComplete == FALSE) break;
if ( (m_pClientList[i]->m_iGuildGUID == iV1) && (m_pClientList[i]->m_iGuildGUID != 0)) {
iRet = m_pClientList[i]->m_pXSock->iSendMsg(cTemp, dwMsgSize +22);
}
}
break;
case 2:
case 10:
for (i = 1; i < DEF_MAXCLIENTS; i++)
if (m_pClientList[i] != NULL) {
iRet = m_pClientList[i]->m_pXSock->iSendMsg(cTemp, dwMsgSize +22);
}
break;
}
}
-
Tafka12
- <3 bd long time
- Posts: 772
- Joined: Wed Dec 28, 2005 6:32 pm
Post
by Tafka12 »
take "<-- its that error." off hihi
Well i tell you
Just download some other source for a moment, take the function, copy here and its fine.
-
xmukox
- Member
- Posts: 175
- Joined: Sun Sep 11, 2005 9:53 am
Post
by xmukox »
i try that and... nop help ;[
-
Crossfade
- Loyal fan
- Posts: 354
- Joined: Sun Mar 20, 2005 5:55 pm
Post
by Crossfade »
xmukox wrote: hello i have questions what's wrong with that code:
Code: Select all
C:\...\HGServer 2.24c\Game.cpp(9861) : error C2601: 'ChatMsgHandlerGSM' : local function definitions are illegal
C:\...\HGServer 2.24c\Game.cpp(9861) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Code: Select all
void CGame::ChatMsgHandlerGSM(int iMsgType, int iV1, char * pName, char * pData, DWORD dwMsgSize)
{ <-- its that error.
register int i, iRet;
DWORD * dwp;
WORD * wp;
short * sp;
char * cp, cTemp[256], cSendMode = NULL;
ZeroMemory(cTemp, sizeof(cTemp));
dwp = (DWORD *)cTemp;
*dwp = MSGID_COMMAND_CHATMSG;
wp = (WORD *)(cTemp + DEF_INDEX2_MSGTYPE);
*wp = NULL;
cp = (char *)(cTemp + DEF_INDEX2_MSGTYPE + 2);
sp = (short *)cp;
*sp = NULL;
cp += 2;
sp = (short *)cp;
*sp = NULL;
cp += 2;
memcpy(cp, pName, 10);
cp += 10;
*cp = (char)iMsgType;
cp++;
memcpy(cp, pData, dwMsgSize);
cp += dwMsgSize;
switch (iMsgType) {
case 1:
for (i = 1; i < DEF_MAXCLIENTS; i++)
if (m_pClientList[i] != NULL) {
if (m_pClientList[i]->m_bIsInitComplete == FALSE) break;
if ( (m_pClientList[i]->m_iGuildGUID == iV1) && (m_pClientList[i]->m_iGuildGUID != 0)) {
iRet = m_pClientList[i]->m_pXSock->iSendMsg(cTemp, dwMsgSize +22);
}
}
break;
case 2:
case 10:
for (i = 1; i < DEF_MAXCLIENTS; i++)
if (m_pClientList[i] != NULL) {
iRet = m_pClientList[i]->m_pXSock->iSendMsg(cTemp, dwMsgSize +22);
}
break;
}
}
you have too many closings on the function above or not enough on this function
-
Tafka12
- <3 bd long time
- Posts: 772
- Joined: Wed Dec 28, 2005 6:32 pm
Post
by Tafka12 »
1 too many.
-
xmukox
- Member
- Posts: 175
- Joined: Sun Sep 11, 2005 9:53 am
Post
by xmukox »
kk i fix it its but with ''},{'' on summonguild. thx