31.07.2011, 04:15
pawn Код:
if(strcmp(cmd, "/accent", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Usage: /accent <accent> (German, Spanish, American, Irish, Italian)");
return 1;
{ // This is line 28396
new accent[128];
accent = PlayerInfo[playerid][pAccent]);
{
switch(PlayerInfo[playerid][pAccent])
{
case 1: accent = "American";
{
PlayerInfo[playerid][pAccent] = accent;
format(string, sizeof(string), "Accent changed to %d", accent);
SendClientMessage(playerid, COLOR_GREY, string);
}
case 2: accent = "Irish"; // This is line 28408
{
PlayerInfo[playerid][pAccent] = accent;
format(string, sizeof(string), "Accent changed to %d", accent);
SendClientMessage(playerid, COLOR_GREY, string);
}
case 3: accent = "Spanish";
{
PlayerInfo[playerid][pAccent] = accent;
format(string, sizeof(string), "Accent changed to %d", accent);
SendClientMessage(playerid, COLOR_GREY, string);
}
case 4: accent = "German";
{
PlayerInfo[playerid][pAccent] = accent;
format(string, sizeof(string), "Accent changed to %d", accent);
SendClientMessage(playerid, COLOR_GREY, string);
}
case 5: accent = "Italian";
{
PlayerInfo[playerid][pAccent] = accent;
format(string, sizeof(string), "Accent changed to %d", accent);
SendClientMessage(playerid, COLOR_GREY, string);
}
default:
{
format(string, sizeof(string), "Invalid Accent", accent);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
return 1;
}
Код:
D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28396) : warning 225: unreachable code D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28398) : error 047: array sizes do not match, or destination array is too small D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28398) : error 029: invalid expression, assumed zero D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28398) : warning 215: expression has no effect D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28403) : error 002: only a single statement (or expression) can follow each "case" D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28404) : error 006: must be assigned to an array D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28408) : error 014: invalid statement; not in switch D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28408) : warning 215: expression has no effect D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28408) : error 001: expected token: ";", but found ":" D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28408) : error 029: invalid expression, assumed zero D:\Sa-mp\Random Scripts\Mania-RP\gamemodes\Mania-RP.pwn(28408) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.