Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Enable Debug mode in the source

The Sky's the Limit ^_^
Joined
Jul 3, 2010
Messages
722
Reaction score
58
Hello everyone,

I am looking to enable debug mode in the source, as I'm looking to make my own custom Login map. The old GunZLoader obviously doesn't work with the newest 1.5 files, and I know that by using the debug/developer mode from the source I can use it to get the coordinates to make the Login.

However, when I try to build the source I get this error. Has anyone come across it?

Code:
Clean source\Gunz\ZChat_Cmds.cpp(1268) : error C2660: 'ZPostLadderRequestChallenge' : function does not take 3 arguments

Heres the code snippet from that file, I've highlighted where the error triggers:

Code:
void ChatCmd_LadderTest(const char* line,const int argc, char **const argv)
{
	// »ç¿ëÇÏ´Â ºÎºÐÀÌ ¾ø¾î¼­ µð¹ö±×¿ëÀ¸·Î ¼öÁ¤ÇÔ. -by SungE 2007-04-02
#ifdef _DEBUG
	if (argc == 1)
	{
		char szPlayerName[MATCHOBJECT_NAME_LENGTH];
		strcpy(szPlayerName, ZGetMyInfo()->GetCharName());
		char* pName[1];
		pName[0] = szPlayerName;

		[B][COLOR="#FF0000"]ZPostLadderRequestChallenge(pName, 1, 0);
[/COLOR][/B]	} else if (argc == 2)
	{
		char szPlayerName[MATCHOBJECT_NAME_LENGTH], szTeamMember1[MATCHOBJECT_NAME_LENGTH];
		strcpy(szPlayerName, ZGetMyInfo()->GetCharName());
		strcpy(szTeamMember1, argv[1]);

		char*pName[2];
		pName[0] = szPlayerName;
		pName[1] = szTeamMember1;

		[B][COLOR="#FF0000"]ZPostLadderRequestChallenge(pName, 2, 0);
[/COLOR][/B]	}
#endif
}

Would appreciate it if anyone could help :).
 
The Sky's the Limit ^_^
Joined
Jul 3, 2010
Messages
722
Reaction score
58
open your zpost.h search for ZPostLadderRequestChallenge and paste here the whole inline

Hey, thanks here it is:

Code:
inline void ZPostLadderRequestChallenge(char** ppMemberCharNames, const int nMemberCount, unsigned long int nOptions, unsigned long int nAntiLead)	// ÀڽűîÁö Æ÷ÇÔ
{
	void* pBlobMembersName = MMakeBlobArray(sizeof(MTD_ReplierNode), nMemberCount);
	for (int i = 0; i < nMemberCount; i++)
	{
		MTD_LadderTeamMemberNode* pMemberNode = (MTD_LadderTeamMemberNode*)MGetBlobArrayElement(pBlobMembersName, i);
		strcpy(pMemberNode->szName, ppMemberCharNames[i]);
	}

	ZPOSTCMD4( MC_MATCH_LADDER_REQUEST_CHALLENGE, MCmdParamInt(nMemberCount), MCmdParamUInt(nOptions),
			   MCmdParamBlob(pBlobMembersName, MGetBlobArraySize(pBlobMembersName)), MCmdParamUInt(nAntiLead) );
		

	MEraseBlobArray(pBlobMembersName);
}

inline void ZPostLadderCancel()
{
	ZPOSTCMD0(MC_MATCH_LADDER_REQUEST_CANCEL_CHALLENGE)
}
 
Upvote 0
Joined
Jul 9, 2009
Messages
716
Reaction score
324
Hey, thanks here it is:

Code:
inline void ZPostLadderRequestChallenge(char** ppMemberCharNames, const int nMemberCount, unsigned long int nOptions, unsigned long int nAntiLead)	// ÀڽűîÁö Æ÷ÇÔ
{
	void* pBlobMembersName = MMakeBlobArray(sizeof(MTD_ReplierNode), nMemberCount);
	for (int i = 0; i < nMemberCount; i++)
	{
		MTD_LadderTeamMemberNode* pMemberNode = (MTD_LadderTeamMemberNode*)MGetBlobArrayElement(pBlobMembersName, i);
		strcpy(pMemberNode->szName, ppMemberCharNames[i]);
	}

	ZPOSTCMD4( MC_MATCH_LADDER_REQUEST_CHALLENGE, MCmdParamInt(nMemberCount), MCmdParamUInt(nOptions),
			   MCmdParamBlob(pBlobMembersName, MGetBlobArraySize(pBlobMembersName)), MCmdParamUInt(nAntiLead) );
		

	MEraseBlobArray(pBlobMembersName);
}

inline void ZPostLadderCancel()
{
	ZPOSTCMD0(MC_MATCH_LADDER_REQUEST_CANCEL_CHALLENGE)
}
well, your ZPostLadderRequestChallenge takes 4 arguments and not 3.. you did ZPostLadderRequestChallenge(1,2,3) with 3 arguments and you need 4
inline void ZPostLadderRequestChallenge(char** ppMemberCharNames, const int nMemberCount, unsigned long int nOptions, unsigned long int nAntiLead)

anyways:

void ChatCmd_LadderTest(const char* line,const int argc, char **const argv)
{
// »ç¿ëÇÏ´Â ºÎºÐÀÌ ¾ø¾î¼­ µð¹ö±×¿ëÀ¸·Î ¼öÁ¤ÇÔ. -by SungE 2007-04-02
#ifdef _DEBUG
if (argc == 1)
{
char szPlayerName[MATCHOBJECT_NAME_LENGTH];
strcpy(szPlayerName, ZGetMyInfo()->GetCharName());
char* pName[1];
pName[0] = szPlayerName;

ZPostLadderRequestChallenge(pName, 1, 0,0);
} else if (argc == 2)
{
char szPlayerName[MATCHOBJECT_NAME_LENGTH], szTeamMember1[MATCHOBJECT_NAME_LENGTH];
strcpy(szPlayerName, ZGetMyInfo()->GetCharName());
strcpy(szTeamMember1, argv[1]);

char*pName[2];
pName[0] = szPlayerName;
pName[1] = szTeamMember1;

ZPostLadderRequestChallenge(pName, 2, 0,0);
}
#endif
}
 
Upvote 0
The Sky's the Limit ^_^
Joined
Jul 3, 2010
Messages
722
Reaction score
58
well, your ZPostLadderRequestChallenge takes 4 arguments and not 3.. you did ZPostLadderRequestChallenge(1,2,3) with 3 arguments and you need 4
inline void ZPostLadderRequestChallenge(char** ppMemberCharNames, const int nMemberCount, unsigned long int nOptions, unsigned long int nAntiLead)

anyways:

That's great, thank you. I now have another error:

LINK : fatal error LNK1104: cannot open file 'CSCommonE.lib'

I've tried linking to CSCommon/Lib by going to GunZ Properties > Linker > Additional Library Directories - but this doesn't seem to work.
 
Upvote 0
Initiate Mage
Joined
Mar 6, 2017
Messages
75
Reaction score
4
That's great, thank you. I now have another error:



I've tried linking to CSCommon/Lib by going to GunZ Properties > Linker > Additional Library Directories - but this doesn't seem to work.

Having the same issue. Have you resolved this?
 
Upvote 0
Initiate Mage
Joined
Mar 6, 2017
Messages
75
Reaction score
4
Hey,

No I haven't resolved this, I kinda gave up on it lol. All I want it for is so I can create my own Login.mrs :/

I just want to debug. I have no idea what I'm doing. I changed the build config to debug and fixed all the errors except this one. Am I on the right path for debugging or am I way off?
 
Upvote 0
The Sky's the Limit ^_^
Joined
Jul 3, 2010
Messages
722
Reaction score
58
I just want to debug. I have no idea what I'm doing. I changed the build config to debug and fixed all the errors except this one. Am I on the right path for debugging or am I way off?

Is there a reason why you want to debug? The only reason why I'm doing it is because from what I can tell the debug runnable shows coordinates for where you are standing which can then be used to make your own Login map (because the old developer runnable used for the old files doesn't work with 1.5 files).
 
Upvote 0
Initiate Mage
Joined
Mar 6, 2017
Messages
75
Reaction score
4
Is there a reason why you want to debug? The only reason why I'm doing it is because from what I can tell the debug runnable shows coordinates for where you are standing which can then be used to make your own Login map (because the old developer runnable used for the old files doesn't work with 1.5 files).

There are some bugs I want to fix and I thought debugging was the way to do that. Maybe I'm wrong?

In ju13rn source, duel mode is bugged. Jork source has some weird damage bug. I thought I could debug, inflict damage, and see which functions are being called so I can try to fix the bugs. In general I want to run the game and see which functions are called from the start so I can learn the code base.
 
Upvote 0
Junior Spellweaver
Joined
Jun 14, 2015
Messages
123
Reaction score
20
The CSCommon debug binary named CSCommonDE.lib by default as far as I recall, so sounds like you have something linking to the wrong thing. Does Gunz's main.h link to CSCommonE.lib in the _DEBUG branch? You should change that to CSCommonDE.lib if so (or whatever the output name is, you should be able to check in Properties -> Librarian).
 
Upvote 0
The Sky's the Limit ^_^
Joined
Jul 3, 2010
Messages
722
Reaction score
58
The CSCommon debug binary named CSCommonDE.lib by default as far as I recall, so sounds like you have something linking to the wrong thing. Does Gunz's main.h link to CSCommonE.lib in the _DEBUG branch? You should change that to CSCommonDE.lib if so (or whatever the output name is, you should be able to check in Properties -> Librarian).

Hey,

Initially it was set to CSCommonE.lib - but I changed it to CSCommonDE.lib as that exists too.. however whenever I build the source, the file for some reason gets deleted? Whats up with that?
 
Upvote 0
Back
Top