What is wrong with that code?
#3

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(Mobile[playerid] != 255)
    {
        new idx;
        new tmp[ 128 ];
        new sendername[ MAX_PLAYER_NAME ];
        tmp = strtok(text, idx);
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s Says (cellphone): %s", sendername, text);
        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        if(IsPlayerConnected(Mobile[playerid]))
        {
            if(Mobile[Mobile[playerid]] == playerid)
            {
                SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_YELLOW,"Theres nobody there");
        }
        return 0;
    }
    if (realchat)
    {
        new sendername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        sendername[strfind(sendername,"_")] = ' ';
        format(string, sizeof(string), "%s says: %s", sendername, text);
        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        new lengthtime = strlen(text);
        new time = lengthtime*50;
        ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
        return 0;
    }
    return 1;
}
will give this:
Код:
D:\Roleplay\gamemodes\esrp.pwn(493) : error 017: undefined symbol "string"
D:\Roleplay\gamemodes\esrp.pwn(493) : error 017: undefined symbol "string"
D:\Roleplay\gamemodes\esrp.pwn(493) : error 029: invalid expression, assumed zero
D:\Roleplay\gamemodes\esrp.pwn(493) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
What is wrong with that code? - by vent - 12.10.2011, 11:50
Re: What is wrong with that code? - by Jafet_Macario - 12.10.2011, 11:55
Re: What is wrong with that code? - by vent - 12.10.2011, 11:58
Re: What is wrong with that code? - by Jafet_Macario - 12.10.2011, 12:00
Re: What is wrong with that code? - by vent - 12.10.2011, 12:03

Forum Jump:


Users browsing this thread: 1 Guest(s)