SA-MP Forums Archive
eroor not found { } - 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: eroor not found { } (/showthread.php?tid=530555)



eroor not found { } - ILOVEPAWNV - 07.08.2014

the erors
Код HTML:
error 002: only a single statement (or expression) can follow each "case"
and
Код:
public OnPlayerRequestClass(playerid, classid)
{
	switch(classid) {
		case 1:
			SetPlayerColor(playerid, 0xFFFF00AA);
			SetSpawnInfo(playerid, 1, GetPlayerSkin(playerid), 1137.6893, 1344.9765, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
			GameTextForPlayer(playerid, "~y~Team -A-", 3500, 3);
			case 7:
			SetPlayerColor(playerid, 0x00FFFFFF);
			SetSpawnInfo(playerid, 2, GetPlayerSkin(playerid), 1137.5227, 1221.604, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
			GameTextForPlayer(playerid, "~b~Team -B-", 3500, 3);
	}
	SetupPlayerForClassSelection(playerid);
	return 1;
}
this public Give me eroors
can you help me please|?


Re: eroor not found { } - ILOVEPAWNV - 07.08.2014

the eroor's coming from this public...


Re: eroor not found { } - Sawalha - 07.08.2014

Fixed:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
            case 1:
            {
                SetPlayerColor(playerid, 0xFFFF00AA);
                SetSpawnInfo(playerid, 1, GetPlayerSkin(playerid), 1137.6893, 1344.9765, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
                GameTextForPlayer(playerid, "~y~Team -A-", 3500, 3);
            }
            case 7:
            {
                SetPlayerColor(playerid, 0x00FFFFFF);
                SetSpawnInfo(playerid, 2, GetPlayerSkin(playerid), 1137.5227, 1221.604, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
                GameTextForPlayer(playerid, "~b~Team -B-", 3500, 3);
            }
    }
    SetupPlayerForClassSelection(playerid);
    return 1;
}



Re: eroor not found { } - ILOVEPAWNV - 07.08.2014

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
Fixed:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
            case 1:
            {
                SetPlayerColor(playerid, 0xFFFF00AA);
                SetSpawnInfo(playerid, 1, GetPlayerSkin(playerid), 1137.6893, 1344.9765, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
                GameTextForPlayer(playerid, "~y~Team -A-", 3500, 3);
            }
            case 7:
            {
                SetPlayerColor(playerid, 0x00FFFFFF);
                SetSpawnInfo(playerid, 2, GetPlayerSkin(playerid), 1137.5227, 1221.604, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
                GameTextForPlayer(playerid, "~b~Team -B-", 3500, 3);
            }
    }
    SetupPlayerForClassSelection(playerid);
    return 1;
}
Im send you PM SEE THIS.


Re: eroor not found { } - ViniBorn - 07.08.2014

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 1:
        {
            SetPlayerColor(playerid, 0xFFFF00AA);
            SetSpawnInfo(playerid, 1, GetPlayerSkin(playerid), 1137.6893, 1344.9765, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
            GameTextForPlayer(playerid, "~y~Team -A-", 3500, 3);
        }
        case 7:
        {
            SetPlayerColor(playerid, 0x00FFFFFF);
            SetSpawnInfo(playerid, 2, GetPlayerSkin(playerid), 1137.5227, 1221.604, 10.8203, 0.0, 0, 0, 0, 0, 0, 0);
            GameTextForPlayer(playerid, "~b~Team -B-", 3500, 3);
        }
    }
    SetupPlayerForClassSelection(playerid);
    return 1;
}