PDA

View Full Version : warning 217: loose indentation


lulo356
08/07/2015, 10:23 PM
public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~r~Wasted",1500,0);
PlayerDied[playerid] = 1;
SendDeathMessage(killerid, playerid, reason);

if(IsInGunGame[playerid] == 1)
{
IsInGunGame[playerid] = 1;
if(killerid != INVALID_PLAYER_ID)
{
new rank[MAX_PLAYERS];
KillScore[killerid]++;

if(KillScore[killerid] == 2)
{
rank[killerid] = 1;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,24,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 1 = Desert Eagle");
}
else if(KillScore[killerid] == 4)
{
rank[killerid] = 2;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,32,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 2 = Tec 9");
}
else if(KillScore[killerid] == 6)
{
rank[killerid] = 3;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,28,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 3 = Uzi");
}
else if(KillScore[killerid] == 8)
{
rank[killerid] = 4;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,29,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 4 = SMG");
}
else if(KillScore[killerid] == 10)
{
rank[killerid] = 5;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,30,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 5 = Ak 47");
}
else if(KillScore[killerid] == 12)
{
rank[killerid] = 6;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,33,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 6 = Country Rifle");
}
else if(KillScore[killerid] == 14)
{
rank[killerid] = 7;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,34,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 7 = Sniper Rifle");
}
else if(KillScore[killerid] == 16)
{
rank[killerid] = 8;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,35,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 8 = Rocket Launcher");
}
else if(KillScore[killerid] == 18)
{
rank[killerid] = 9;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,36,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 9 = HS Rocket Launcher");
}
else if(KillScore[killerid] == 20)
{
rank[killerid] = 10;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,38,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 10 = MiniGun");
}
else if(KillScore[killerid] == 22)
{
rank[killerid] = 12;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,37,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 12 = FlameThrower");
}
else if(KillScore[killerid] == 24)
{
rank[killerid] = 13;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,4,0);
SendClientMessage(killerid,COLOR_RED,"You Are On The Last level = Knife!");
}
else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
fSendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));

if(Grove[playerid] == 1)
{
SetPlayerPos(killerid,2494.5767,-1686.1864,13.5129);
SetPlayerInterior(killerid,0);
}
if(Ballas[playerid] == 1)
{
SetPlayerPos(killerid,1999.8833,-1120.6167,26.7746);
SetPlayerInterior(killerid,0);
}
if(Vagos[playerid] == 1)
{
SetPlayerPos(killerid,2455.4861,-1097.9379,43.0875);
SetPlayerInterior(killerid,0);
}
if(Aztecas[playerid] == 1)
{
SetPlayerPos(killerid,2522.2378,-2000.4359,13.5469);
SetPlayerInterior(killerid,0);
}
if(Cop[playerid] == 1)
{
SetPlayerPos(killerid,1550.6207,-1675.7418,15.4894);
SetPlayerInterior(killerid,0);
}
if(Punk[playerid] == 1)
{
SetPlayerPos(killerid,1304.3850,-1092.8927,25.7651);
SetPlayerInterior(killerid,0);
}

GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,30,2000);
GivePlayerWeapon(playerid,34,333);
GivePlayerWeapon(playerid,26,1333);
GivePlayerWeapon(playerid,35,1000);
GivePlayerWeapon(playerid,22,500);
KillScore[killerid] = 0;
IsInGunGame[killerid] = 0;
}
}
}

Sime30
08/07/2015, 10:28 PM
You are missing a bracket }
It should be like this

else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
fSendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}

lulo356
08/07/2015, 10:31 PM
You are missing a bracket }
It should be like this

else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
fSendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}


I'm just getting more errors if i'm placing an bracket there,

Sime30
08/07/2015, 10:31 PM
Your code was a mess. Try now

public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~r~Wasted",1500,0);
PlayerDied[playerid] = 1;
SendDeathMessage(killerid, playerid, reason);

if(IsInGunGame[playerid] == 1)
{
IsInGunGame[playerid] = 1;
if(killerid != INVALID_PLAYER_ID)
{
new rank[MAX_PLAYERS];
KillScore[killerid]++;

if(KillScore[killerid] == 2)
{
rank[killerid] = 1;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,24,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 1 = Desert Eagle");
}
else if(KillScore[killerid] == 4)
{
rank[killerid] = 2;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,32,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 2 = Tec 9");
}
else if(KillScore[killerid] == 6)
{
rank[killerid] = 3;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,28,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 3 = Uzi");
}
else if(KillScore[killerid] == 8)
{
rank[killerid] = 4;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,29,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 4 = SMG");
}
else if(KillScore[killerid] == 10)
{
rank[killerid] = 5;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,30,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 5 = Ak 47");
}
else if(KillScore[killerid] == 12)
{
rank[killerid] = 6;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,33,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 6 = Country Rifle");
}
else if(KillScore[killerid] == 14)
{
rank[killerid] = 7;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,34,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 7 = Sniper Rifle");
}
else if(KillScore[killerid] == 16)
{
rank[killerid] = 8;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,35,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 8 = Rocket Launcher");
}
else if(KillScore[killerid] == 18)
{
rank[killerid] = 9;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,36,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 9 = HS Rocket Launcher");
}
else if(KillScore[killerid] == 20)
{
rank[killerid] = 10;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,38,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 10 = MiniGun");
}
else if(KillScore[killerid] == 22)
{
rank[killerid] = 12;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,37,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 12 = FlameThrower");
}
else if(KillScore[killerid] == 24)
{
rank[killerid] = 13;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,4,0);
SendClientMessage(killerid,COLOR_RED,"You Are On The Last level = Knife!");
}
else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
fSendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}
if(Grove[playerid] == 1) <========== error line
{
SetPlayerPos(killerid,2494.5767,-1686.1864,13.5129);
SetPlayerInterior(killerid,0);
}
if(Ballas[playerid] == 1)
{
SetPlayerPos(killerid,1999.8833,-1120.6167,26.7746);
SetPlayerInterior(killerid,0);
}
if(Vagos[playerid] == 1)
{
SetPlayerPos(killerid,2455.4861,-1097.9379,43.0875);
SetPlayerInterior(killerid,0);
}
if(Aztecas[playerid] == 1)
{
SetPlayerPos(killerid,2522.2378,-2000.4359,13.5469);
SetPlayerInterior(killerid,0);
}
if(Cop[playerid] == 1)
{
SetPlayerPos(killerid,1550.6207,-1675.7418,15.4894);
SetPlayerInterior(killerid,0);
}
if(Punk[playerid] == 1)
{
SetPlayerPos(killerid,1304.3850,-1092.8927,25.7651);
SetPlayerInterior(killerid,0);
}

GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,30,2000);
GivePlayerWeapon(playerid,34,333);
GivePlayerWeapon(playerid,26,1333);
GivePlayerWeapon(playerid,35,1000);
GivePlayerWeapon(playerid,22,500);
KillScore[killerid] = 0;
IsInGunGame[killerid] = 0;
}
}
if(killerid != INVALID_PLAYER_ID)
{
PlayerKillCount[killerid] ++;
GivePlayerMoney(killerid, 1000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
}
PlayerDeaths[playerid] ++;
return 1;
}

Vince
08/07/2015, 10:34 PM
Compare writing on a piece of paper. The orange line represents the left margin. The warning line is before the margin.

http://puu.sh/iS7sk/316c29944d.png

Edit: it must be noted that I am avidly against "try this" posts. The OP will in most cases just copy the result without taking note of what was changed and most importantly WHY it was changed. Give a man a fish and you feed him for day, teach a man to fish and you feed him for a lifetime.

Mouiz
08/07/2015, 10:37 PM
Use this:
public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~r~Wasted",1500,0);
PlayerDied[playerid] = 1;
SendDeathMessage(killerid, playerid, reason);

if(IsInGunGame[playerid] == 1)
{
IsInGunGame[playerid] = 1;
if(killerid != INVALID_PLAYER_ID)
{
new rank[MAX_PLAYERS];
KillScore[killerid]++;

if(KillScore[killerid] == 2)
{
rank[killerid] = 1;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,24,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 1 = Desert Eagle");
}
else if(KillScore[killerid] == 4)
{
rank[killerid] = 2;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,32,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 2 = Tec 9");
}
else if(KillScore[killerid] == 6)
{
rank[killerid] = 3;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,28,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 3 = Uzi");
}
else if(KillScore[killerid] == 8)
{
rank[killerid] = 4;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,29,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 4 = SMG");
}
else if(KillScore[killerid] == 10)
{
rank[killerid] = 5;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,30,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 5 = Ak 47");
}
else if(KillScore[killerid] == 12)
{
rank[killerid] = 6;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,33,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 6 = Country Rifle");
}
else if(KillScore[killerid] == 14)
{
rank[killerid] = 7;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,34,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 7 = Sniper Rifle");
}
else if(KillScore[killerid] == 16)
{
rank[killerid] = 8;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,35,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 8 = Rocket Launcher");
}
else if(KillScore[killerid] == 18)
{
rank[killerid] = 9;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,36,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 9 = HS Rocket Launcher");
}
else if(KillScore[killerid] == 20)
{
rank[killerid] = 10;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,38,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 10 = MiniGun");
}
else if(KillScore[killerid] == 22)
{
rank[killerid] = 12;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,37,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 12 = FlameThrower");
}
else if(KillScore[killerid] == 24)
{
rank[killerid] = 13;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,4,0);
SendClientMessage(killerid,COLOR_RED,"You Are On The Last level = Knife!");
}
else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
SendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}
if(Grove[playerid] == 1) <========== error line
{
SetPlayerPos(killerid,2494.5767,-1686.1864,13.5129);
SetPlayerInterior(killerid,0);
}
if(Ballas[playerid] == 1)
{
SetPlayerPos(killerid,1999.8833,-1120.6167,26.7746);
SetPlayerInterior(killerid,0);
}
if(Vagos[playerid] == 1)
{
SetPlayerPos(killerid,2455.4861,-1097.9379,43.0875);
SetPlayerInterior(killerid,0);
}
if(Aztecas[playerid] == 1)
{
SetPlayerPos(killerid,2522.2378,-2000.4359,13.5469);
SetPlayerInterior(killerid,0);
}
if(Cop[playerid] == 1)
{
SetPlayerPos(killerid,1550.6207,-1675.7418,15.4894);
SetPlayerInterior(killerid,0);
}
if(Punk[playerid] == 1)
{
SetPlayerPos(killerid,1304.3850,-1092.8927,25.7651);
SetPlayerInterior(killerid,0);
}

GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,30,2000);
GivePlayerWeapon(playerid,34,333);
GivePlayerWeapon(playerid,26,1333);
GivePlayerWeapon(playerid,35,1000);
GivePlayerWeapon(playerid,22,500);
KillScore[killerid] = 0;
IsInGunGame[killerid] = 0;
}
}
}
if(killerid != INVALID_PLAYER_ID)
{
PlayerKillCount[killerid] ++;
GivePlayerMoney(killerid, 1000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
}
PlayerDeaths[playerid] ++;
return 1;
}

Sime30
08/07/2015, 10:38 PM
@Vince - Yes, the alignment wasn't good, but he had } on a wrong place too. I fixed that but idk why it gets messy when I put in into pawn tag.

EDIT: Yes, I fully understand you Vince. 90% of time I don't do that, but I think he just wants the code to be working without asking many questions

lulo356
08/07/2015, 10:47 PM
Your code was a mess. Try now

public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~r~Wasted",1500,0);
PlayerDied[playerid] = 1;
SendDeathMessage(killerid, playerid, reason);

if(IsInGunGame[playerid] == 1)
{
IsInGunGame[playerid] = 1;
if(killerid != INVALID_PLAYER_ID)
{
new rank[MAX_PLAYERS];
KillScore[killerid]++;

if(KillScore[killerid] == 2)
{
rank[killerid] = 1;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,24,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 1 = Desert Eagle");
}
else if(KillScore[killerid] == 4)
{
rank[killerid] = 2;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,32,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 2 = Tec 9");
}
else if(KillScore[killerid] == 6)
{
rank[killerid] = 3;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,28,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 3 = Uzi");
}
else if(KillScore[killerid] == 8)
{
rank[killerid] = 4;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,29,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 4 = SMG");
}
else if(KillScore[killerid] == 10)
{
rank[killerid] = 5;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,30,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 5 = Ak 47");
}
else if(KillScore[killerid] == 12)
{
rank[killerid] = 6;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,33,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 6 = Country Rifle");
}
else if(KillScore[killerid] == 14)
{
rank[killerid] = 7;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,34,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 7 = Sniper Rifle");
}
else if(KillScore[killerid] == 16)
{
rank[killerid] = 8;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,35,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 8 = Rocket Launcher");
}
else if(KillScore[killerid] == 18)
{
rank[killerid] = 9;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,36,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 9 = HS Rocket Launcher");
}
else if(KillScore[killerid] == 20)
{
rank[killerid] = 10;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,38,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 10 = MiniGun");
}
else if(KillScore[killerid] == 22)
{
rank[killerid] = 12;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,37,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 12 = FlameThrower");
}
else if(KillScore[killerid] == 24)
{
rank[killerid] = 13;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,4,0);
SendClientMessage(killerid,COLOR_RED,"You Are On The Last level = Knife!");
}
else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
fSendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}
if(Grove[playerid] == 1) <========== error line
{
SetPlayerPos(killerid,2494.5767,-1686.1864,13.5129);
SetPlayerInterior(killerid,0);
}
if(Ballas[playerid] == 1)
{
SetPlayerPos(killerid,1999.8833,-1120.6167,26.7746);
SetPlayerInterior(killerid,0);
}
if(Vagos[playerid] == 1)
{
SetPlayerPos(killerid,2455.4861,-1097.9379,43.0875);
SetPlayerInterior(killerid,0);
}
if(Aztecas[playerid] == 1)
{
SetPlayerPos(killerid,2522.2378,-2000.4359,13.5469);
SetPlayerInterior(killerid,0);
}
if(Cop[playerid] == 1)
{
SetPlayerPos(killerid,1550.6207,-1675.7418,15.4894);
SetPlayerInterior(killerid,0);
}
if(Punk[playerid] == 1)
{
SetPlayerPos(killerid,1304.3850,-1092.8927,25.7651);
SetPlayerInterior(killerid,0);
}

GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,30,2000);
GivePlayerWeapon(playerid,34,333);
GivePlayerWeapon(playerid,26,1333);
GivePlayerWeapon(playerid,35,1000);
GivePlayerWeapon(playerid,22,500);
KillScore[killerid] = 0;
IsInGunGame[killerid] = 0;
}
}
if(killerid != INVALID_PLAYER_ID)
{
PlayerKillCount[killerid] ++;
GivePlayerMoney(killerid, 1000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
}
PlayerDeaths[playerid] ++;
return 1;
}


C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(509) : warning 217: loose indentation
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(510) : warning 217: loose indentation
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(558) : warning 202: number of arguments does not match definition
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(575) : warning 217: loose indentation
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(580) : warning 217: loose indentation
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(602) : error 010: invalid function or declaration
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(609) : error 010: invalid function or declaration
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(1312) : warning 203: symbol is never used: "PlayerDeaths"
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(1312) : warning 203: symbol is never used: "PlayerKillCount"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


Use this:
public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~r~Wasted",1500,0);
PlayerDied[playerid] = 1;
SendDeathMessage(killerid, playerid, reason);

if(IsInGunGame[playerid] == 1)
{
IsInGunGame[playerid] = 1;
if(killerid != INVALID_PLAYER_ID)
{
new rank[MAX_PLAYERS];
KillScore[killerid]++;

if(KillScore[killerid] == 2)
{
rank[killerid] = 1;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,24,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 1 = Desert Eagle");
}
else if(KillScore[killerid] == 4)
{
rank[killerid] = 2;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,32,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 2 = Tec 9");
}
else if(KillScore[killerid] == 6)
{
rank[killerid] = 3;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,28,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 3 = Uzi");
}
else if(KillScore[killerid] == 8)
{
rank[killerid] = 4;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,29,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 4 = SMG");
}
else if(KillScore[killerid] == 10)
{
rank[killerid] = 5;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,30,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 5 = Ak 47");
}
else if(KillScore[killerid] == 12)
{
rank[killerid] = 6;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,33,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 6 = Country Rifle");
}
else if(KillScore[killerid] == 14)
{
rank[killerid] = 7;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,34,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 7 = Sniper Rifle");
}
else if(KillScore[killerid] == 16)
{
rank[killerid] = 8;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,35,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 8 = Rocket Launcher");
}
else if(KillScore[killerid] == 18)
{
rank[killerid] = 9;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,36,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 9 = HS Rocket Launcher");
}
else if(KillScore[killerid] == 20)
{
rank[killerid] = 10;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,38,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 10 = MiniGun");
}
else if(KillScore[killerid] == 22)
{
rank[killerid] = 12;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,37,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 12 = FlameThrower");
}
else if(KillScore[killerid] == 24)
{
rank[killerid] = 13;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,4,0);
SendClientMessage(killerid,COLOR_RED,"You Are On The Last level = Knife!");
}
else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
SendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}
if(Grove[playerid] == 1) <========== error line
{
SetPlayerPos(killerid,2494.5767,-1686.1864,13.5129);
SetPlayerInterior(killerid,0);
}
if(Ballas[playerid] == 1)
{
SetPlayerPos(killerid,1999.8833,-1120.6167,26.7746);
SetPlayerInterior(killerid,0);
}
if(Vagos[playerid] == 1)
{
SetPlayerPos(killerid,2455.4861,-1097.9379,43.0875);
SetPlayerInterior(killerid,0);
}
if(Aztecas[playerid] == 1)
{
SetPlayerPos(killerid,2522.2378,-2000.4359,13.5469);
SetPlayerInterior(killerid,0);
}
if(Cop[playerid] == 1)
{
SetPlayerPos(killerid,1550.6207,-1675.7418,15.4894);
SetPlayerInterior(killerid,0);
}
if(Punk[playerid] == 1)
{
SetPlayerPos(killerid,1304.3850,-1092.8927,25.7651);
SetPlayerInterior(killerid,0);
}

GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,30,2000);
GivePlayerWeapon(playerid,34,333);
GivePlayerWeapon(playerid,26,1333);
GivePlayerWeapon(playerid,35,1000);
GivePlayerWeapon(playerid,22,500);
KillScore[killerid] = 0;
IsInGunGame[killerid] = 0;
}
}
}
if(killerid != INVALID_PLAYER_ID)
{
PlayerKillCount[killerid] ++;
GivePlayerMoney(killerid, 1000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
}
PlayerDeaths[playerid] ++;
return 1;
}

C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(509) : warning 217: loose indentation
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(510) : warning 217: loose indentation
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(558) : warning 202: number of arguments does not match definition
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(560) : error 029: invalid expression, assumed zero
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(560) : error 017: undefined symbol "error"
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(560) : error 017: undefined symbol "line"
C:\Users\Davey\Desktop\unnamed roleplay\gamemodes\script.pwn(560) : fatal error 107: too many error messages on one line

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


4 Errors.

Sime30
08/07/2015, 10:50 PM
Just fix how your code looks like. Look Vince's example above. You get loose indentation because your code is not in a "perfect line"

kyriakos587
08/07/2015, 10:52 PM
I think this work

public OnPlayerDeath(playerid, killerid, reason)
{
GameTextForPlayer(playerid,"~r~Wasted",1500,0);
PlayerDied[playerid] = 1;
SendDeathMessage(killerid, playerid, reason);

if(IsInGunGame[playerid] == 1)
{
IsInGunGame[playerid] = 1;
if(killerid != INVALID_PLAYER_ID)
{
new rank[MAX_PLAYERS];
KillScore[killerid]++;

if(KillScore[killerid] == 2)
{
rank[killerid] = 1;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,24,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 1 = Desert Eagle");
}
else if(KillScore[killerid] == 4)
{
rank[killerid] = 2;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,32,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 2 = Tec 9");
}
else if(KillScore[killerid] == 6)
{
rank[killerid] = 3;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,28,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 3 = Uzi");
}
else if(KillScore[killerid] == 8)
{
rank[killerid] = 4;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,29,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 4 = SMG");
}
else if(KillScore[killerid] == 10)
{
rank[killerid] = 5;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,30,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 5 = Ak 47");
}
else if(KillScore[killerid] == 12)
{
rank[killerid] = 6;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,33,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 6 = Country Rifle");
}
else if(KillScore[killerid] == 14)
{
rank[killerid] = 7;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,34,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 7 = Sniper Rifle");
}
else if(KillScore[killerid] == 16)
{
rank[killerid] = 8;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,35,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 8 = Rocket Launcher");
}
else if(KillScore[killerid] == 18)
{
rank[killerid] = 9;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,36,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 9 = HS Rocket Launcher");
}
else if(KillScore[killerid] == 20)
{
rank[killerid] = 10;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,38,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 10 = MiniGun");
}
else if(KillScore[killerid] == 22)
{
rank[killerid] = 12;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,37,1000);
SendClientMessage(killerid,COLOR_RED,"You Are On Level 12 = FlameThrower");
}
else if(KillScore[killerid] == 24)
{
rank[killerid] = 13;
ResetPlayerWeapons(killerid);
GivePlayerWeapon(killerid,4,0);
SendClientMessage(killerid,COLOR_RED,"You Are On The Last level = Knife!");
}
else if(KillScore[killerid] == 25)
{
rank[killerid] = 14;
SendClientMessageToAll(COLOR_GREEN, "-->%s WON the GunGame!<--",RPName(killerid));
}
if(Grove[playerid] == 1)
{
SetPlayerPos(killerid,2494.5767,-1686.1864,13.5129);
SetPlayerInterior(killerid,0);
}
if(Ballas[playerid] == 1)
{
SetPlayerPos(killerid,1999.8833,-1120.6167,26.7746);
SetPlayerInterior(killerid,0);
}
if(Vagos[playerid] == 1)
{
SetPlayerPos(killerid,2455.4861,-1097.9379,43.0875);
SetPlayerInterior(killerid,0);
}
if(Aztecas[playerid] == 1)
{
SetPlayerPos(killerid,2522.2378,-2000.4359,13.5469);
SetPlayerInterior(killerid,0);
}
if(Cop[playerid] == 1)
{
SetPlayerPos(killerid,1550.6207,-1675.7418,15.4894);
SetPlayerInterior(killerid,0);
}
if(Punk[playerid] == 1)
{
SetPlayerPos(killerid,1304.3850,-1092.8927,25.7651);
SetPlayerInterior(killerid,0);
}

GivePlayerWeapon(playerid,28,5000);
GivePlayerWeapon(playerid,30,2000);
GivePlayerWeapon(playerid,34,333);
GivePlayerWeapon(playerid,26,1333);
GivePlayerWeapon(playerid,35,1000);
GivePlayerWeapon(playerid,22,500);
KillScore[killerid] = 0;
IsInGunGame[killerid] = 0;
}
}
}
if(killerid != INVALID_PLAYER_ID)
{
PlayerKillCount[killerid] ++;
GivePlayerMoney(killerid, 1000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
}
PlayerDeaths[playerid] ++;
return 1;
}

lulo356
08/07/2015, 10:57 PM
All fixed now, Thanks for the help..