#1

Helppp

pawn Код:
C:\Users\Dragos\Desktop\RealPlay.pwn(14484) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14486) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14488) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14490) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14493) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14495) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14499) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14500) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14503) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14505) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14509) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14511) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14514) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14516) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14519) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14521) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14524) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14526) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14529) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14532) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14536) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14537) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14540) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14542) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14546) : error 010: invalid function or declaration
C:\Users\Dragos\Desktop\RealPlay.pwn(14548) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.




pawn Код:
if(strcmp(cmd, "/startwar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(wtimer[playerid] < 1)
            { }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 12 ore la fiecare war!");
                return 1;
            }
            if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 13|| PlayerInfo[playerid][pLeader] == 6)
            {
                provoked = 1;
//              new x_nr[256];
                x_nr = strtok(cmdtext, idx);
                if(!strlen(x_nr))
                {
                        SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]");
                        return 0;
                }
                if(strcmp(x_nr,"list",true) == 0)
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________");
                    SendClientMessage(playerid, COLOR_GRAD1, "1:GS/LS 2: BS/LS  3: Madd Dog House 4: Banca");
                    return 1;
                }
                else if(strcmp(x_nr,"1",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"2",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}}au declarat WAR , zona: {FFFFFF}BS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"3",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");
                    return 1;
                }
                else if(strcmp(x_nr,"4",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}au declarat WAR , zona: {FFFFFF}Banca");
                    return 1;
                }
            }
            else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pLeader] == 17)
            {
                provoked = 1;
                //new x_nr[256];
                x_nr = strtok(cmdtext, idx);
                if(!strlen(x_nr))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]");
                    return 1;
                }
                if(strcmp(x_nr,"list",true) == 0)
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: GS/LS 2: BS/LS 3: Madd Dog House 4: Banca");
                    return 1;
                }
                else if(strcmp(x_nr,"1",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"2",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa {00FA9A}}au declarat WAR , zona: {FFFFFF}BS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"3",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");
                    return 1;
                }
                else if(strcmp(x_nr,"4",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa{00FA9A}au declarat WAR , zona: {FFFFFF}Banca");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You are not a gang / mafia leader!");
                return 1;
            }
            wtimer[playerid] = 3000000;
        }
        return 1;
    }

if(strcmp(cmd, "/acceptwar", true) == 0)
 {
        if(IsPlayerConnected(playerid))
        {
        if (provoked == 1)
         {
            if (PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 5)
         {
           new hour,minuite;
           gettime(hour,minuite);
           FixHour(hour);
           scoreteam1 = 0;
           scoreteam2 = 0;
           SetTimer("wartime", 1800000, false);
           SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
           format(string, sizeof(string), "{006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads vS {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia");
           SendClientMessageToAll(COLOR_WHITE,string);
           SendClientMessageToAll(COLOR_WHITE, "Premiul: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}200 {33AA33}Drugs");
           format(string, sizeof(string), "War inceput la ora: {F81414}%d: %d", hour, minuite);
           SendClientMessageToAll(COLOR_WHITE,string);
           SendClientMessageToAll(COLOR_WHITE, "Va rugam evitati acea zona!");
           SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
           provoked = 0;
            }
            }
            else
            {
              SendClientMessage(playerid, COLOR_GREY, "You are not a Leader or a gang/mafia Leader.");
            }
            }
      return 1;
 }
Reply
#2

Hi dragos i'm here for a little hehp. So could you show as the line (14484) that has a warning or error 010: invalid function or declaration?
Reply
#3

pawn Код:
if(strcmp(cmd, "/startwar", true) == 0)
line 14484
Reply
#4

Try this not tested
Код:
if(strcmp(cmd, "/startwar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(wtimer[playerid] < 1)
            { 
            } 
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Trebuie sa astepti 12 ore la fiecare war!");
                return 1;
            }
            if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 13|| PlayerInfo[playerid][pLeader] == 6)
            {
                provoked = 1;
//              new x_nr[256];
                x_nr = strtok(cmdtext, idx);
                if(!strlen(x_nr))
                {
                        SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]");
                        return 0;
                }
                if(strcmp(x_nr,"list",true) == 0)
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________");
                    SendClientMessage(playerid, COLOR_GRAD1, "1:GS/LS 2: BS/LS  3: Madd Dog House 4: Banca");
                    return 1;
                }
                else if(strcmp(x_nr,"1",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"2",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}}au declarat WAR , zona: {FFFFFF}BS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"3",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");
                    return 1;
                }
                else if(strcmp(x_nr,"4",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {8B5A2B}Bllas-{DBDB70}LSV{D3D3D3}-{66CD00}Yakuza - Coronos {00FA9A}au declarat WAR , zona: {FFFFFF}Banca");
                    return 1;
                }
            }
            else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 21 || PlayerInfo[playerid][pLeader] == 17)
            {
                provoked = 1;
                //new x_nr[256];
                x_nr = strtok(cmdtext, idx);
                if(!strlen(x_nr))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Tasteaza: /startwar list , /startwar [locul]");
                    return 1;
                }
                if(strcmp(x_nr,"list",true) == 0)
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "_________Lista Locuri_________");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: GS/LS 2: BS/LS 3: Madd Dog House 4: Banca");
                    return 1;
                }
                else if(strcmp(x_nr,"1",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"2",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa {00FA9A}}au declarat WAR , zona: {FFFFFF}BS/LS");
                    return 1;
                }
                else if(strcmp(x_nr,"3",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");
                    return 1;
                }
                else if(strcmp(x_nr,"4",true) == 0)
                {
                    SendClientMessageToAll(COLOR_GREEN, "{00FA9A}[WAR]: {EE2C2C}Grove{D3D3D3}-{97FFFF}LCN{D3D3D3}-{CD3278}Mafia Albaneza - Riffa{00FA9A}au declarat WAR , zona: {FFFFFF}Banca");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "You are not a gang / mafia leader!");
                return 1;
            }
            wtimer[playerid] = 3000000;
        }
        return 1;
    }

if(strcmp(cmd, "/acceptwar", true) == 0)
 {
        if(IsPlayerConnected(playerid))
        {
        if (provoked == 1)
         {
            if (PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 5)
         {
           new hour,minuite;
           gettime(hour,minuite);
           FixHour(hour);
           scoreteam1 = 0;
           scoreteam2 = 0;
           SetTimer("wartime", 1800000, false);
           SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
           format(string, sizeof(string), "{006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads vS {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia");
           SendClientMessageToAll(COLOR_WHITE,string);
           SendClientMessageToAll(COLOR_WHITE, "Premiul: {F81414}50.000 {33AA33}$ {F81414}5000 {33AA33}Mats {F81414}200 {33AA33}Drugs");
           format(string, sizeof(string), "War inceput la ora: {F81414}%d: %d", hour, minuite);
           SendClientMessageToAll(COLOR_WHITE,string);
           SendClientMessageToAll(COLOR_WHITE, "Va rugam evitati acea zona!");
           SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Started____|");
           provoked = 0;
            }
            }
            else
            {
              SendClientMessage(playerid, COLOR_GREY, "You are not a Leader or a gang/mafia Leader.");
            }
            }
      return 1;
 }
Reply
#5

1) Is this under 'public OnPlayerCommandText(playerid, cmdtext[])' ??
2) Do you have '#include <a_samp>' at the top of your script??
3) Try changing 'cmd' to 'cmdtext'
Reply
#6

not working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)