Pawn error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pawn error (
/showthread.php?tid=440257)
Pawn error -
Geeboi_Mehdi - 29.05.2013
pawn Код:
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
pawn Код:
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;
}
}
Re: Pawn error -
Pottus - 29.05.2013
Probably missing a brace somewhere around there
Re: Pawn error -
Geeboi_Mehdi - 29.05.2013
here are the lines
pawn Код:
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;
}
}
}
}
}
Re: Pawn error -
IceBilizard - 29.05.2013
pawn Код:
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;
}
}
}
}
}