OnPLayerDeath Help Getting errors
#1

pawn Код:
Spree[killerid]++;
    Spree[playerid] = 0;
    new string[100];
    if(Spree[killerid] == 10)//Checking for 10 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 10 kills. +2 score");
        GivePlayerScore(killerid, 2);
    }
    else if(Spree[killerid] == 20)//For 20 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Senior Killer!", Name(killerid), Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 20 kills. +4 score");
        GivePlayerScore(killerid, 4);
    }
    else if(Spree[killerid] == 30)//30 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Master Killer!", Name(killerid), Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 30 kills. +6 score");
        GivePlayerScore(killerid, 6);
    }
    else if(Spree[killerid] == 40)//40 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. General Killer!", Name(killerid), Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 40 kills. +8 score");
        GivePlayerScore(killerid, 8);
    }
    else if(Spree[killerid] == 50)//50 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Insane Killer!", Name(killerid), Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 50 kills. +10 score");
        GivePlayerScore(killerid, 10);
    }
    else if(Spree[killerid] == 60)//60 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. God Killer!", Name(killerid), Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 60 kills. +12 score");
        GivePlayerScore(killerid, 12);
    }

Went I compile I get This error

PHP код:
C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : error 012invalid function callnot a valid address
C
:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : warning 215expression has no effect
C
:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : error 001expected token";"but found ")"
C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : error 029invalid expressionassumed zero
C
:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : fatal error 107too many error messages on one line 
can anyone help +REP+REP+REP

-Regard john
Reply
#2

What or Which Line is it ?
Reply
#3

Which one is line 16874?
Reply
#4

format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree[killerid]);

all The Line That Format :V
Reply
#5

I think it must be like this :-

pawn Код:
Spree[killerid]++;
    Spree[playerid] = 0;
    new string[100];
    if(Spree[killerid] == 10)//Checking for 10 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name[killerid], Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 10 kills. +2 score");
        GivePlayerScore(killerid, 2);
    }
    else if(Spree[killerid] == 20)//For 20 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Senior Killer!", Name[killerid], Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 20 kills. +4 score");
        GivePlayerScore(killerid, 4);
    }
    else if(Spree[killerid] == 30)//30 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Master Killer!", Name[killerid], Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 30 kills. +6 score");
        GivePlayerScore(killerid, 6);
    }
    else if(Spree[killerid] == 40)//40 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. General Killer!", Name[killerid], Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 40 kills. +8 score");
        GivePlayerScore(killerid, 8);
    }
    else if(Spree[killerid] == 50)//50 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. Insane Killer!", Name[killerid], Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 50 kills. +10 score");
        GivePlayerScore(killerid, 10);
    }
    else if(Spree[killerid] == 60)//60 kills
    {
        format(string, sizeof(string), "%s is on a killing spree of %d kills. God Killer!", Name[killerid], Spree[killerid]);
        SendClientMessageToAll(COLOR_NAVY, string);
        SendClientMessage(killerid, COLOR_GREEN, "You are on a killing spree of 60 kills. +12 score");
        GivePlayerScore(killerid, 12);
    }
Give it a try
Reply
#6

pawn Код:
format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree[killerid]);
This is the mistake i think it should be:
pawn Код:
format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree(killerid));
Reply
#7

Thanks bro :v but your Thing have 1 problem but i fixed it :v thanks sorry i cant rep becuz my rep -1 i cant rep anyone
Reply
#8

Quote:
Originally Posted by qazwsx
Посмотреть сообщение
pawn Код:
format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree[killerid]);
This is the mistake i think it should be:
pawn Код:
format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree(killerid));


__________________________________________________ __________________________________________________
Guys i have a problem went a player killing spree that show the Death And is show the one who get shotted
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)