Can anyone tell me whats the matter?

Results 1 to 4 of 4
  1. #1
    Currently Stoned ! Ronny786 is offline
    MemberRank
    Dec 2011 Join Date
    Lost WorldLocation
    984Posts

    Can anyone tell me whats the matter?

    Even after using room tag the message doesnt display.. is code right ?

    if wrong please post a solution here.


    Code:
    char szText[256];
    	char szText1[256];
    	if (uidChar == GetPlayerUID())
    	{
    		ZGetGameInterface()->GetChat()->Clear(ZChat::CL_STAGE);
    
    		char szTmp[ 256];
    		sprintf(szTmp, "(%03d)%s", nRoomNo, szStageName);
    
    		if(strstr(ZGetGameClient()->GetStageName(),"[NF]")||strstr(ZGetGameClient()->GetStageName(),"[nf]"))
    	{
    		printf("No Flip Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[IB]")||strstr(ZGetGameClient()->GetStageName(),"[ib]"))
    	{
    		printf("Infinite Bullet Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[NM]")||strstr(ZGetGameClient()->GetStageName(),"[nm]"))
    	{
    		printf("No Massive Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[G]")||strstr(ZGetGameClient()->GetStageName(),"[g]"))
    	{
    		printf("No Gravity Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[R]")||strstr(ZGetGameClient()->GetStageName(),"[r]"))
    	{
    		printf("Automatic Reload Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[NC]")||strstr(ZGetGameClient()->GetStageName(),"[nc]"))
    	{
    		printf("No Premiums Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[NJ]")||strstr(ZGetGameClient()->GetStageName(),"[nj]"))
    	{
    		printf("Ninja Jump Mode Activated.",szText1);
    	}
    	else if(strstr(ZGetGameClient()->GetStageName(),"[DS]")||strstr(ZGetGameClient()->GetStageName(),"[ds]"))
    	{
    		printf("Special Weapons through scroll Deactivated.",szText1);
    	}
    
    		ZTransMsg( szText, MSG_JOINED_STAGE, 1, szTmp, szText1);
    		ZChatOutput(szText, ZChat::CMT_SYSTEM, ZChat::CL_STAGE);
    		ZChatOutput(szText1, ZChat::CMT_SYSTEM, ZChat::CL_STAGE);


  2. #2
    Wait wut PenguinGuy is offline
    MemberRank
    Apr 2010 Join Date
    United StatesLocation
    765Posts

    Re: Can anyone tell me whats the matter?

    No, printf is used for Output.
    Use sprintf/sprintf_s such as:
    sprintf( szText1, "Ninja Jump Move Activated." );

  3. #3
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Can anyone tell me whats the matter?

    printf / sprintf, really?

    strcat - C++ Reference

  4. #4
    Wait wut PenguinGuy is offline
    MemberRank
    Apr 2010 Join Date
    United StatesLocation
    765Posts

    Re: Can anyone tell me whats the matter?

    Quote Originally Posted by Wizkidje View Post
    printf / sprintf, really?

    strcat - C++ Reference
    That's it. Haven't really dealt with C/C++ in quite a few months.



Advertisement