public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_JUTUM;
GameTextForPlayer(playerid, "~b~JUTUM", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
case 1:
{
gTeam[playerid] = TEAM_KOKUS;
GameTextForPlayer(playerid, "~r~KOKUS", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
case 2:
{
gTeam[playerid] = TEAM_JUMBO;
GameTextForPlayer(playerid, "~r~JUMBO", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
C:\Users\Nelson\Desktop\SERVER\gamemodes\taa.pwn(347) : error 014: invalid statement; not in switch
C:\Users\Nelson\Desktop\SERVER\gamemodes\taa.pwn(347) : warning 215: expression has no effect
C:\Users\Nelson\Desktop\SERVER\gamemodes\taa.pwn(347) : error 001: expected token: ";", but found ":"
C:\Users\Nelson\Desktop\SERVER\gamemodes\taa.pwn(347) : error 029: invalid expression, assumed zero
C:\Users\Nelson\Desktop\SERVER\gamemodes\taa.pwn(347) : 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.
if(classid == 0)
if(classid == 1)
if(classid == 2)
Use like this
Код:
if(classid == 0) Код:
if(classid == 1) Код:
if(classid == 2) |
error 002: only a single statement (or expression) can follow each "case"
error 029: invalid expression, assumed zero
error 010: invalid function or declaration
error 010: invalid function or declaration
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~Americaaa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 1)
{
gTeam[playerid] = TEAM_ASIA;
GameTextForPlayer(playerid, "~r~ASIA", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
if(classid == 2)
{
gTeam[playerid] = TEAM_AFRICA;
GameTextForPlayer(playerid, "~r~AFRICA", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~Americaaa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 1)
{
gTeam[playerid] = TEAM_ASIA;
GameTextForPlayer(playerid, "~r~ASIA", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 2)
{
gTeam[playerid] = TEAM_AFRICA;
GameTextForPlayer(playerid, "~r~AFRICA", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
return 1;
}
}
}
if(classid == 2)
}
if(classid == 2)
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~Ameericaa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 1)
{
gTeam[playerid] = TEAM_ASIA;
GameTextForPlayer(playerid, "~r~Asia", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
if(classid == 2)
{
gTeam[playerid] = TEAM_AFRICA;
GameTextForPlayer(playerid, "~r~Africa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
return 1;
}
error 002: only a single statement (or expression) can follow each "case"
error 029: invalid expression, assumed zero
error 010: invalid function or declaration
3 Errors.
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_AMERICA;
GameTextForPlayer(playerid, "~b~Ameericaa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
case 1:
{
gTeam[playerid] = TEAM_ASIA;
GameTextForPlayer(playerid, "~r~Asia", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
case 2
{
gTeam[playerid] = TEAM_AFRICA;
GameTextForPlayer(playerid, "~r~Africa", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = TEAM_JUTUM;
GameTextForPlayer(playerid, "~b~JUTUM", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
case 1:
{
gTeam[playerid] = TEAM_KOKUS;
GameTextForPlayer(playerid, "~r~KOKUS", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
case 2:
{
gTeam[playerid] = TEAM_JUMBO;
GameTextForPlayer(playerid, "~r~JUMBO", 5000, 5);
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
}
}
}
PHP код:
|