24.12.2012, 14:18
errors:
Code:
pawn Код:
Arko.pwn(27341) : error 036: empty statement
Arko.pwn(27344) : error 002: only a single statement (or expression) can follow each "case"
Arko.pwn(27344 -- 27345) : error 029: invalid expression, assumed zero
Arko.pwn(27346) : error 014: invalid statement; not in switch
Arko.pwn(27346) : warning 215: expression has no effect
Arko.pwn(27346) : error 001: expected token: ";", but found ":"
Arko.pwn(27346) : error 029: invalid expression, assumed zero
Arko.pwn(27346) : fatal error 107: too many error messages on one line
pawn Код:
command(seatbelt, playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
new string[128], vehicleid = GetPlayerVehicleID(playerid);;
switch(Player[playerid][Seatbelt])
{
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510)
{
case 0:
{
Player[playerid][Seatbelt] = 1;
format(string, sizeof(string), "* %s take their helmet placing it on their head, straping it tightly.", GetName(playerid));
NearByMessage(playerid, PURPLE, string);
}
case 1:
{
Player[playerid][Seatbelt] = 0;
format(string, sizeof(string), "* %s unstraps their helmet, taking it off.", GetName(playerid));
NearByMessage(playerid, PURPLE, string);
}
{
else
}
switch(Player[playerid][Seatbelt])
{
case 0:
{
Player[playerid][Seatbelt] = 1;
format(string, sizeof(string), "* %s slides their seatbelt across their chest, buckling it tightly", GetName(playerid));
NearByMessage(playerid, PURPLE, string);
}
case 1:
{
Player[playerid][Seatbelt] = 0;
format(string, sizeof(string), "* %s unbuckles their seatbelt", GetName(playerid));
NearByMessage(playerid, PURPLE, string);
}
}
}
}
return 1;
}