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

Error Client-Game communication with Packets


revengertmt

Question

Hi M2dev!
I want to make communications with packets like this

but i have 1 problem....1 little problem...

Error	201	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	202	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	203	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	204	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	205	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	206	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	207	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	208	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	209	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	210	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	211	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	212	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	213	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	214	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	215	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	216	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	217	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	218	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	219	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	220	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	221	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	222	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	223	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	224	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	225	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	226	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	227	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	228	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	229	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	230	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	231	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	232	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	233	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	234	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	235	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	237	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	238	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	241	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	242	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	243	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	244	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	245	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	255	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	256	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	257	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	258	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	260	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	261	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	262	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\packet.h	2006	1	UserInterface
Error	263	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	264	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	265	error C2011: 'SPacketGCStateGetMd5' : 'struct' type redefinition	c:\users\dev\desktop\morphefiles\client src\source\userinterface\Packet.h	2006	1	UserInterface
Error	247	error C2051: case expression not constant	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	635	1	UserInterface
Error	250	error C2065: 'GetFalseMd5Packet' : undeclared identifier	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4316	1	UserInterface
Error	251	error C2065: 'GetFalseMd5Packet' : undeclared identifier	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4317	1	UserInterface
Error	253	error C2065: 'GetFalseMd5Packet' : undeclared identifier	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4319	1	UserInterface
Error	246	error C2065: 'HEADER_GC_GETMD5_FALSE' : undeclared identifier	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	635	1	UserInterface
Error	248	error C2065: 'TPacketCGGetFalseMd5' : undeclared identifier	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4316	1	UserInterface
Error	254	error C2070: 'unknown-type': illegal sizeof operand	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4319	1	UserInterface
Error	249	error C2146: syntax error : missing ';' before identifier 'GetFalseMd5Packet'	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4316	1	UserInterface
Error	252	error C2228: left of '.header' must have class/struct/union	C:\Users\DEV\Desktop\MorpheFiles\Client Src\Source\UserInterface\PythonNetworkStreamPhaseGame.cpp	4317	1	UserInterface

in packet.h at line 2006 i have right this...

typedef struct packet_quest_confirm  //line 1997
{
    BYTE header;
    char msg[64+1];
    long timeout;
    DWORD requestPID;
} TPacketGCQuestConfirm;

typedef struct SPacketGCStateGetMd5 //line 2005
{                                   //line 2006
	BYTE header;
} TPacketCGGetFalseMd5;

typedef struct packet_attack
{
    BYTE        header;
    DWORD       dwVID;
    DWORD       dwVictimVID;    // 적 VID
    BYTE        bType;          // 공격 유형
} TPacketGCAttack;                            ///line 2016

in pythonnetworkstreamphasegame at line 635 i have this

			case HEADER_GC_DRAGON_SOUL_REFINE:    ///line 631
				ret = RecvDragonSoulRefine();
				break;

			case HEADER_GC_GETMD5_FALSE:    ////line 635
				ret = RecvDragonSoulRefine();
				break;

			default:
				ret = RecvDefaultPacket(header);
				break;
		}
#ifdef __PERFORMANCE_CHECK__
		DWORD timeEndPacket=timeGetTime();

		{
			PERF_PacketInfo& rkPacketInfo=kMap_kPacketInfo[header];
			rkPacketInfo.dwCount++;
			rkPacketInfo.dwTime+=timeEndPacket-timeBeginPacket;			
		}

		{
			PERF_PacketInfo& rkPacketInfo=gs_kPacketTimeAnalyzer.m_kMap_kPacketInfo[header];
			rkPacketInfo.dwCount++;
			rkPacketInfo.dwTime+=timeEndPacket-timeBeginPacket;			
		}
#endif
	}                                                          ///line 658

and at line 4316-4317-4319 i have this...

	if (LocaleService_IsEUROPE() && false == LocaleService_IsYMIR())     ///line 4288
	{
		TPacketCGClientVersion2 kVersionPacket;
		kVersionPacket.header = HEADER_CG_CLIENT_VERSION2;
		strncpy(kVersionPacket.filename, filename.c_str(), sizeof(kVersionPacket.filename)-1);
		strncpy(kVersionPacket.timestamp, "1215955205", sizeof(kVersionPacket.timestamp)-1); // # python time.time 앞자리
		//strncpy(kVersionPacket.timestamp, __TIMESTAMP__, sizeof(kVersionPacket.timestamp)-1); // old_string_ver
		//strncpy(kVersionPacket.timestamp, "1218055205", sizeof(kVersionPacket.timestamp)-1); // new_future
		//strncpy(kVersionPacket.timestamp, "1214055205", sizeof(kVersionPacket.timestamp)-1); // old_past

		if (!Send(sizeof(kVersionPacket), &kVersionPacket))
			Tracef("SendClientReportPacket Error");
	}
	else
	{
		TPacketCGClientVersion kVersionPacket;
		kVersionPacket.header = HEADER_CG_CLIENT_VERSION;
		strncpy(kVersionPacket.filename, filename.c_str(), sizeof(kVersionPacket.filename)-1);
		strncpy(kVersionPacket.timestamp, __TIMESTAMP__, sizeof(kVersionPacket.timestamp)-1);

		if (!Send(sizeof(kVersionPacket), &kVersionPacket))
			Tracef("SendClientReportPacket Error");
	}
	return SendSequence();
}

bool CPythonNetworkStream::SendGetFalseMd5Packet()
{
	TPacketCGGetFalseMd5 GetFalseMd5Packet;       ///line 4316
	GetFalseMd5Packet.header = HEADER_CG_GETFALSE_MD5;    ////line 4317

	if (!Send(sizeof(GetFalseMd5Packet), &GetFalseMd5Packet))  ///line 4319
		Tracef("GetFalseMd5Packet Error");

	return SendSequence();
}

bool CPythonNetworkStream::RecvAffectAddPacket()
{
	TPacketGCAffectAdd kAffectAdd;
	if (!Recv(sizeof(kAffectAdd), &kAffectAdd))
		return false;

	TPacketAffectElement & rkElement = kAffectAdd.elem;
	if (rkElement.bPointIdxApplyOn == POINT_ENERGY)
	{
		CPythonPlayer::instance().SetStatus (POINT_ENERGY_END_TIME, CPythonApplication::Instance().GetServerTimeStamp() + rkElement.lDuration);
		__RefreshStatus();
	}
	PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_NEW_AddAffect", Py_BuildValue("(iiii)", rkElement.dwType, rkElement.bPointIdxApplyOn, rkElement.lApplyValue, rkElement.lDuration));

	return true;
}                                          ///line 4340

who is the problem???.....

Link to comment
Share on other sites

  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0

and in my files.....???

where is need to edit?

define funtions intro include guards.

 

#ifndef _GET_MD2_
#define _GET_MD2_

typedef struct SPacketGCStateGetMd5 //line 2005
{                                   //line 2006
	BYTE header;
} TPacketCGGetFalseMd5;


#endf

 

Edited by ds_aim
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.