Help me to fix this error in chat tag!
#1

Код:
#include <a_samp>
new player_tag[24] // Max tag letters (24)

CMD:settag(playerid,params[]) // zCMD.
{
    if(IsPlayerAdmin(playerid))
    {
        new target,string[60];
        if(sscanf(params,"us",target,player_tag)) return SendClientMessage(playerid,-1,"* /settag [playerid/partofname] [tag]");
        SendClientMessage(playerid,"Tag set.");
    }
}

public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME],string[180];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"<%s> %s: %s",player_tag,name,text);
    SendClientMessageToAll(-1,string);
    return 0;
}
Error: error 001: expected token: ";", but found "-label-"

Error line:
Код:
CMD:settag(playerid,params[]) // zCMD.
PLEASE HELP ME HOW TO FIX THIS??!!= ?? ?? ??
Reply
#2

Quote:
Originally Posted by Hillo
Посмотреть сообщение
Код:
#include <a_samp>
new player_tag[24] // Max tag letters (24)

CMD:settag(playerid,params[]) // zCMD.
{
    if(IsPlayerAdmin(playerid))
    {
        new target,string[60];
        if(sscanf(params,"us",target,player_tag)) return SendClientMessage(playerid,-1,"* /settag [playerid/partofname] [tag]");
        SendClientMessage(playerid,"Tag set.");
    }
}

public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME],string[180];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"<%s> %s: %s",player_tag,name,text);
    SendClientMessageToAll(-1,string);
    return 0;
}
Error: error 001: expected token: ";", but found "-label-"

Error line:
Код:
CMD:settag(playerid,params[]) // zCMD.
PLEASE HELP ME HOW TO FIX THIS??!!= ?? ?? ??
pawn Код:
#include <a_samp>
new player_tag[24]; // Max tag letters (24)

CMD:settag(playerid,params[]) // zCMD.
{
    if(IsPlayerAdmin(playerid))
    {
        new target,string[60];
        if(sscanf(params,"us",target,player_tag)) return SendClientMessage(playerid,-1,"* /settag [playerid/partofname] [tag]");
        SendClientMessage(playerid,"Tag set.");
    }
}

public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME],string[180];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"<%s> %s: %s",player_tag,name,text);
    SendClientMessageToAll(-1,string);
    return 0;
}
Код:
Error: error 001: expected token: ";", but found "-label-"

Error line: CMD:settag(playerid,params[]) // zCMD.
You forgot the ';' behind 'new player_tag[24]'.

Best regards,
Jesse
Reply
#3

Fixed it thanks man
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)