Enable Debug mode in the source

Results 1 to 12 of 12
  1. #1
    The Sky's the Limit ^_^ AuroraUK is online now
    True MemberRank
    Jul 2010 Join Date
    1,091Posts

    Enable Debug mode in the source

    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;
    
    		ZPostLadderRequestChallenge(pName, 1, 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);
    	}
    #endif
    }
    Would appreciate it if anyone could help :-).


  2. #2
    Fuck Army. sahar042 is offline
    True MemberRank
    Jul 2009 Join Date
    833Posts

    Re: Enable Debug mode in the source

    open your zpost.h search for ZPostLadderRequestChallenge and paste here the whole inline

  3. #3
    The Sky's the Limit ^_^ AuroraUK is online now
    True MemberRank
    Jul 2010 Join Date
    1,091Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by sahar042 View Post
    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)
    }

  4. #4
    Fuck Army. sahar042 is offline
    True MemberRank
    Jul 2009 Join Date
    833Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by AuroraUK View Post
    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
    }

  5. #5
    The Sky's the Limit ^_^ AuroraUK is online now
    True MemberRank
    Jul 2010 Join Date
    1,091Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by sahar042 View Post
    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.

  6. #6
    Member discordaxe is offline
    MemberRank
    Mar 2017 Join Date
    52Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by AuroraUK View Post
    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?

  7. #7
    The Sky's the Limit ^_^ AuroraUK is online now
    True MemberRank
    Jul 2010 Join Date
    1,091Posts

    Re: Enable Debug mode in the source

    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 :/

  8. #8
    Member discordaxe is offline
    MemberRank
    Mar 2017 Join Date
    52Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by AuroraUK View Post
    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?

  9. #9
    The Sky's the Limit ^_^ AuroraUK is online now
    True MemberRank
    Jul 2010 Join Date
    1,091Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by discordaxe View Post
    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).

  10. #10
    Member discordaxe is offline
    MemberRank
    Mar 2017 Join Date
    52Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by AuroraUK View Post
    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.

  11. #11
    Hardcore Member Keristrasza is offline
    MemberRank
    Jun 2015 Join Date
    128Posts

    Re: Enable Debug mode in the source

    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).

  12. #12
    The Sky's the Limit ^_^ AuroraUK is online now
    True MemberRank
    Jul 2010 Join Date
    1,091Posts

    Re: Enable Debug mode in the source

    Quote Originally Posted by Keristrasza View Post
    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?



Advertisement