Error 10
#1

How can I fix these errors?

Код:
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(91) : warning 217: loose indentation
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(163) : warning 217: loose indentation
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178) : error 010: invalid function or declaration
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178 -- 183) : error 010: invalid function or declaration
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178 -- 186) : error 010: invalid function or declaration
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178 -- 186) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
//==============================================================================
CMD:me(playerid, params[])
{
    if(gPlayerLogged{playerid} == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
        return 1;
    }

    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s %s", name, params);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
//==============================================================================
CMD:do(playerid, params[])
{
    if(gPlayerLogged{playerid} == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
        return 1;
    }

    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ((%s))", params, name);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
//==============================================================================
CMD:shout(playerid, params[]) {
    return cmd_s(playerid, params);
}
//=============================================================================
Reply
#2

Quote:
Originally Posted by Dare Devil.....
Посмотреть сообщение
How can I fix these errors?

Код:
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(91) : warning 217: loose indentation
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(163) : warning 217: loose indentation
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178) : error 010: invalid function or declaration
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178 -- 183) : error 010: invalid function or declaration
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178 -- 186) : error 010: invalid function or declaration
D:\Rafay\COS-RP V 1.0\gamemodes\COS-RP.pwn(178 -- 186) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
//==============================================================================
CMD:me(playerid, params[])
{
    if(gPlayerLogged{playerid} == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
        return 1;
    }

    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s %s", name, params);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
//==============================================================================
CMD:do(playerid, params[])
{
    if(gPlayerLogged{playerid} == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
        return 1;
    }

    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");
    new string[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s ((%s))", params, name);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
}
//==============================================================================
CMD:shout(playerid, params[]) {
    return cmd_s(playerid, params);
}
//=============================================================================
Try this for the /me command:

pawn Код:
CMD:me(playerid, params[])
{
    if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /me [action]");
    new string[128];
    if(PlayerInfo[playerid][pMask] == 0) {
        format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), params);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else if (PlayerInfo[playerid][pMask] == 1) {
        format(string, sizeof(string), "* Stranger %s",  params);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Mr.1337
Посмотреть сообщение
Try this for the /me command:

pawn Код:
CMD:me(playerid, params[])
{
    if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /me [action]");
    new string[128];
    if(PlayerInfo[playerid][pMask] == 0) {
        format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), params);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else if (PlayerInfo[playerid][pMask] == 1) {
        format(string, sizeof(string), "* Stranger %s",  params);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    return 1;
}
It let me compile but when I use /me in game it says UNKNOWN COMMAND
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)