Newbie Spellweaver
- Joined
- May 14, 2011
- Messages
- 30
- Reaction score
- 12
Hi, I've migrated my source code from Visual Studio 2003 to Visual Studio 2010 or 2012. I get an error when I push button connect on Login: "GunZ has stopped working". I tried absolutely everything, or something.
I wrote mlog's functions after initialization interface will load up to a function called ZPostConnect.
I know where the error lies, on ZPostConnect.
ZInterfaceListener.cpp (line 171)
Definition:
Oop, ZPOSTCMD1 seems to be the error, I go the statement... and I wrote mlog's functions so:
And it comes to error 3, I conclude that it is a problem with the packets send via the ZPostConnect...
I do not know that trying to this point, I need someone with a more or less advanced knowledge to help me get it. I'll get it back somehow.
Thanks and sorry for the bad english, I'm a Spanish speaker.
Posdata: is from Gunz.exe not from MatchServer.exe
I tried with the old version of MatchServer (VS2003) and I get the same error, and when I tried with the server off, I can push the button and it not crash.
I wrote mlog's functions after initialization interface will load up to a function called ZPostConnect.
I know where the error lies, on ZPostConnect.
ZInterfaceListener.cpp (line 171)
class MLoginListener : public MListener{
public:
virtual bool OnCommand(MWidget* pWidget, const char* szMessage){
if(MWidget::IsMsg(szMessage, MBTN_CLK_MSG)==true)
{
ZIDLResource* pResource = ZGetGameInterface()->GetIDLResource();
ZServerView* pServerList = (ZServerView*)pResource->FindWidget( "SelectedServer");
if ( !pServerList)
return false;
ServerInfo* pServer = pServerList->GetSelectedServer();
if ( pServer)
{
if ( pServer->nType == 0 )
return false;
if( !pServer->bIsLive )
return false;
MWidget* pWidget = pResource->FindWidget( "LoginOK");
if ( pWidget)
pWidget->Enable( false);
pWidget = pResource->FindWidget( "LoginFrame");
if ( pWidget)
pWidget->Show( false);
pWidget = pResource->FindWidget( "Login_ConnectingMsg");
if ( pWidget)
pWidget->Show( true);
ZGetGameInterface()->m_bLoginTimeout = true;
ZGetGameInterface()->m_dwLoginTimeout = timeGetTime() + (90 * 1000);
if ( pServer->nType == 7)
{
MWidget* pAddr = pResource->FindWidget( "ServerAddress");
MWidget* pPort = pResource->FindWidget( "ServerPort");
ZPostConnect( pAddr->GetText(), atoi(pPort->GetText()));
}
else
ZPostConnect( pServer->szAddress, pServer->nPort);
MLabel* pLabel = (MLabel*)pResource->FindWidget( "LoginError");
if ( pLabel)
pLabel->SetText("");
}
}
return false;
}
};
Definition:
inline void ZPostConnect(const char* szAddr, unsigned int nPort)
{
char szCmd[256];
sprintf(szCmd, "%s:%u", szAddr, nPort);
ZPOSTCMD1(MC_NET_CONNECT, MCmdParamStr(szCmd));
}
Oop, ZPOSTCMD1 seems to be the error, I go the statement... and I wrote mlog's functions so:
#define ZPOSTCMD1(_ID, _P0) { mlog("Error 1 \n"); MCommand* pC=ZNewCmd(_ID); mlog("Error 2 \n"); pC->AP(_P0); mlog("Error 3 \n"); ZPostCommand(pC); }
And it comes to error 3, I conclude that it is a problem with the packets send via the ZPostConnect...
I do not know that trying to this point, I need someone with a more or less advanced knowledge to help me get it. I'll get it back somehow.
Thanks and sorry for the bad english, I'm a Spanish speaker.
Posdata: is from Gunz.exe not from MatchServer.exe
I tried with the old version of MatchServer (VS2003) and I get the same error, and when I tried with the server off, I can push the button and it not crash.