chat problem
#1

so... i made chat for ppls wich will have trol status... so i i made like this and i alos fixed some errors but idk how to fix that 2.

PHP код:
    if(strcmp(cmd"/trolchat"true) == || strcmp(cmd"/ttc"true) == 0)
    {
        new 
message[128], string[128];
        if(
sscanf(paramsstring[128], message))
        {
            
SendClientMessage(playeridCOLOR_WHITE"TROLL:  /ttc [MESSAGE]");
        }
        else
        {
            if(
PlayerInfo[playerid][ptroll] >= 1)
            {
                if(
strlen(message) < 1)
                {
                    
SendClientMessage(playeridCOLOR_WHITE"TROLL:  /ttc [MESSAGE]");
                }
                else
                {
                    
format(stringsizeof(string), "[TROLL OOC] %s says (Level %d): %s"sendernamePlayerInfo[playerid][ptroll], message);
                    for(new 
0MAX_PLAYERSi++)
                    {
                        if(
IsPlayerConnected(i) && PlayerInfo[i][ptroll] >= 1)
                        {
                            
SendClientMessage(iCOLOR_WHITEstring);
                        }
                    }
                }
            }
        }
        return 
1;
    } 
Код:
C:\Users\MaticKepa\Desktop\Real Life ENG\gamemodes\mazda.pwn(87044) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\MaticKepa\Desktop\Real Life ENG\gamemodes\mazda.pwn(87045) : error 017: undefined symbol "params"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
chat problem - by kepa333 - 06.07.2012, 14:48
Re: chat problem - by .FuneraL. - 06.07.2012, 14:57
Re: chat problem - by milanosie - 06.07.2012, 14:57
Re: chat problem - by kepa333 - 06.07.2012, 15:33
Re: chat problem - by milanosie - 06.07.2012, 15:38
Re: chat problem - by kepa333 - 06.07.2012, 16:07
Re: chat problem - by kepa333 - 08.07.2012, 16:28

Forum Jump:


Users browsing this thread: 5 Guest(s)