PDA

View Full Version : OnPLayerDeath Help Getting errors


donhu789
10/11/2013, 08:45 AM
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

C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : error 012: invalid function call, not a valid address
C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : warning 215: expression has no effect
C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PhongLan\Desktop\New Folder (19)\gamemodes\SATDM_v14.pwn(16874) : fatal error 107: too many error messages on one line


can anyone help +REP+REP+REP

-Regard john :)

SAMProductions
10/11/2013, 09:01 AM
What or Which Line is it ?

Twizted
10/11/2013, 09:03 AM
Which one is line 16874?

donhu789
10/11/2013, 09:03 AM
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

SAMProductions
10/11/2013, 09:05 AM
I think it must be like this :-

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 :)

qazwsx
10/11/2013, 09:15 AM
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:
format(string, sizeof(string), "%s is on a killing spree of %d kills. Junior Killer!", Name(killerid), Spree(killerid));

donhu789
10/11/2013, 09:16 AM
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

donhu789
10/11/2013, 09:29 AM
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:
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