HELP: case problem
#1

Код:
public OnPlayerEnterCheckpoint(playerid)
{
	new newcar = GetPlayerVehicleID(playerid);
	switch (gPlayerCheckpointStatus[playerid])
	{
        case CHECKPOINT_PROD1:
        {
			if(newcar >= 108 && newcar <= 111 && IsTrailerAttachedToVehicle(newcar))
			//if(IsTrailerAttachedToVehicle(newcar) && GetVehicleTrailer(newcar) == >= 108 &&  <= 111)
			{
			    DisablePlayerCheckpoint(playerid);
		        PlayerPlaySound(playerid, 1059, 0.0, 0.0, 0.0);
		        TogglePlayerControllable(playerid,false);
				GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~obtaining the package, please wait",4000,3);
				SetTimerEx("Product1", 3000, false, "i", playerid);
			}
			else
			{
				SendClientMessage(playerid,COLOR_YELLOW,"You are not inside a Truck with a Trailer.");
			}
        }
        case CHECKPOINT_PROD2:
        {
			if(newcar >= 108 && newcar <= 111 && IsTrailerAttachedToVehicle(newcar))
			{
			    DisablePlayerCheckpoint(playerid);
			    TogglePlayerControllable(playerid,false);
				GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Delivering the package, please wait",4000,3);
				SetTimerEx("Product2", 2000, false, "i", playerid);
			}
			else
			{
				SendClientMessage(playerid,COLOR_YELLOW,"You are not inside a Truck with a Trailer.");
			}
        }
	return 1; <-------- ERROR LINE
}
Код:
Error: error 002: only a single statement (or expression) can follow each "case"
Reply


Messages In This Thread
HELP: case problem - by Jimbo01 - 28.05.2012, 13:11
Re: HELP: case problem - by Kirollos - 28.05.2012, 13:15
AW: HELP: case problem - by Jimbo01 - 28.05.2012, 13:18
Re: HELP: case problem - by Kirollos - 28.05.2012, 13:20

Forum Jump:


Users browsing this thread: 3 Guest(s)