SA-MP Forums Archive
Invalid Function/Declaration - 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: Invalid Function/Declaration (/showthread.php?tid=420588)



Invalid Function/Declaration - Blackazur - 05.03.2013

Код:
stock ZombieSetup(playerid)
{
	SetPlayerTeam(playerid,TEAM_ZOMBIE);
	team[playerid] = TEAM_ZOMBIE;
		switch(random(2))
   			{
				case 0: SetPlayerColor(playerid,COLOR_ZOMBIE);
				case 1: SetPlayerColor(playerid,COLOR_ZOMBIE2);
				}
		}
 	return 1;
}

stock ZombieSetup2(playerid)
{
	SetPlayerTeam(playerid,TEAM_ZOMBIE);
	team[playerid] = TEAM_ZOMBIE;
	SpawnPlayer(playerid);
		switch(random(2))
   			{
				case 0: SetPlayerColor(playerid,COLOR_ZOMBIE);
				case 1: SetPlayerColor(playerid,COLOR_ZOMBIE2);
				}
			}
 	return 1;
}
Hello, i have this Problem:

Код:
invalid function or declaration
Know everyone why?


Re: Invalid Function/Declaration - LetsOWN[PL] - 05.03.2013

pawn Код:
stock ZombieSetup(playerid)
{
    SetPlayerTeam(playerid,TEAM_ZOMBIE);
    team[playerid] = TEAM_ZOMBIE;
        switch(random(2))
            {
                case 0: SetPlayerColor(playerid,COLOR_ZOMBIE);
                case 1: SetPlayerColor(playerid,COLOR_ZOMBIE2);
                //}-- here?
        }
    return 1;
}

stock ZombieSetup2(playerid)
{
    SetPlayerTeam(playerid,TEAM_ZOMBIE);
    team[playerid] = TEAM_ZOMBIE;
    SpawnPlayer(playerid);
        switch(random(2))
            {
                case 0: SetPlayerColor(playerid,COLOR_ZOMBIE);
                case 1: SetPlayerColor(playerid,COLOR_ZOMBIE2);
                //}-here?
            }
    return 1;
}
Greetz,
LetsOWN

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 24 seconds.




AW: Invalid Function/Declaration - Blackazur - 05.03.2013

i've already fixed it but thanks.