PDA

View Full Version : Pawn error


Geeboi_Mehdi
29/05/2013, 01:11 AM
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26704) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26704) : error 014: invalid statement; not in switch
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26704) : warning 215: expression has no effect
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26705) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26724) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26724) : error 014: invalid statement; not in switch
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26724) : warning 215: expression has no effect
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26724) : error 001: expected token: ";", but found ":"
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26724) : error 029: invalid expression, assumed zero
C:\Users\Daoud\Desktop\Aviation Life\gamemodes\AviationLife.pwn(26724) : fatal error 107: too many error messages on one line

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


5 Errors.
i didnt even touch it here is the line


5 Errors.[/pawn]
i didnt even touch it here is the line
case 2;//military
{
if(PInfo[playerid][TotalScore] > 49)
{
gTeam[playerid] = TEAM_MILITARY;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {FF9900}Military Pilot {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 50+ score to select this role!");
ShowRole(playerid);
return 1;
}
}

Pottus
29/05/2013, 01:15 AM
Probably missing a brace somewhere around there

Geeboi_Mehdi
29/05/2013, 01:19 AM
here are the lines

case 0://pilot
{
gTeam[playerid] = TEAM_CPILOT;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {FF9900}Civilian Pilot {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
case 1://bus driver
{
if(PInfo[playerid][TotalScore] > 25)
{
gTeam[playerid] = TEAM_NAVI;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {00FFFF}Bus Driver {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 25+ score to select this role!");
ShowRole(playerid);
}
case 2;//military
{
if(PInfo[playerid][TotalScore] > 49)
{
gTeam[playerid] = TEAM_MILITARY;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {FF9900}Military Pilot {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 50+ score to select this role!");
ShowRole(playerid);
return 1;
}
}

case 3://Marine
{
if(PInfo[playerid][TotalScore] > 99)
{
gTeam[playerid] = TEAM_NAVI;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {00FFFF}Marine {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 100+ score to select this role!");
ShowRole(playerid);
return 1;
}
}
}
}
}

IceBilizard
29/05/2013, 03:37 AM
case 0://pilot
{
gTeam[playerid] = TEAM_CPILOT;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {FF9900}Civilian Pilot {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
case 1://bus driver
{
if(PInfo[playerid][TotalScore] > 25)
{
gTeam[playerid] = TEAM_NAVI;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {00FFFF}Bus Driver {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 25+ score to select this role!");
ShowRole(playerid);
}
}
case 2://military
{
if(PInfo[playerid][TotalScore] > 49)
{
gTeam[playerid] = TEAM_MILITARY;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {FF9900}Military Pilot {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 50+ score to select this role!");
ShowRole(playerid);
return 1;
}
}

case 3://Marine
{
if(PInfo[playerid][TotalScore] > 99)
{
gTeam[playerid] = TEAM_NAVI;
SendClientMessage(playerid, COLOR_WHITE, "Welcome to the {00FFFF}Marine {FFFFFF}role. Type /help to view all commands related.");
TogglePlayerControllable(playerid, 1);
PlayerSpawned[playerid] = 1;
UpdatePlayerColour(playerid);
PurelySpawned[playerid] = 1;
RespawnPlayer(playerid);
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "You need 100+ score to select this role!");
ShowRole(playerid);
return 1;
}
}
}
}
}