staging buffer
#1

Код:
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 514 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 423 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 414 ||
				  GetVehicleModel(GetPlayerVehicleID(playerid)) == 443 ||
				  GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 ||
	    			GetVehicleModel(GetPlayerVehicleID(playerid)) == 456 ||
	    			GetVehicleModel(GetPlayerVehicleID(playerid)) == 422 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 482 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 530 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 418 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 572 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 413 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 440 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 543 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 583 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 478 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 554 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 402 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 542 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 603 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 475 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 568 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 504 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 457 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 483 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 508 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 429 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 541 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 415 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 480 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 434 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 506 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 451 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 555 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 477 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 400 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 404 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 489 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 479 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 442 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 458 ||
					GetVehicleModel(GetPlayerVehicleID(playerid)) == 558)
	    			{// STAGING BUFFER ERROR WHAT DOES IT MEAN?
What does it mean and how can i fix it?
Reply
#2

pawn Код:
switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
{
  case 403, 514, 423 /*etc*/ :
  {
Reply
#3

Код:
error only a single statement (or expression) can follow each "case"
warning: expression has no effect
Код:
			  if(PlayerToPoint(2.0, playerid, 2401.9023,1037.2167,11.0112))
				{
				switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
{
  case 565, 559, 558, 562, 560 , 561:
	    			{
			  		ShowMenuForPlayer(TuningMenu, playerid);
			  		TogglePlayerControllable(playerid,0);
					}
	    				SendClientMessage(playerid,COLOR_YELLOW,"ONLY AA VEHICLES.");//error and warning

}
}
}

		return 1;
}
My indentation is awful
Reply
#4

Edit:
pawn Код:
if(PlayerToPoint(2.0, playerid, 2401.9023,1037.2167,11.0112))
{
  switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
  {
    case 565, 559, 558, 562, 560 , 561:
    {
      ShowMenuForPlayer(TuningMenu, playerid);
      TogglePlayerControllable(playerid,0);
    }
    default :
    {
      SendClientMessage(playerid,COLOR_YELLOW,"ONLY AA VEHICLES.");
    }
  }
}
Reply
#5

Quote:
Originally Posted by paytas
Edit:
pawn Код:
if(PlayerToPoint(2.0, playerid, 2401.9023,1037.2167,11.0112))
{
  switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
  {
    case 565, 559, 558, 562, 560 , 561:
    {
      ShowMenuForPlayer(TuningMenu, playerid);
      TogglePlayerControllable(playerid,0);
    }
    default :
    {
      SendClientMessage(playerid,COLOR_YELLOW,"ONLY AA VEHICLES.");
    }
  }
}
Код:
if(PlayerToPoint(2.0, playerid, 2401.9023,1037.2167,11.0112))
{
  switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
  {
    case 565, 559, 558, 562, 560 , 561:
    {
 				   	ShowMenuForPlayer(TuningMenu, playerid);
			  		TogglePlayerControllable(playerid,0);
					}
					else
					{
	    				SendClientMessage(playerid,COLOR_YELLOW,"[WARNING] You are not allowed to modificate this vehicle");
					}
				}
				default :
				{
					GameTextForPlayer(playerid, "~r~You must be in \"~b~StreetTuner~r~\"", 100, 1);
				}
			}
		}
		return 1;
	}
on else error 002
all errors on '' default : ''
Код:
 error 002: only a single statement (or expression) can follow each "case"
 error 014: invalid statement; not in switch
 : error 029: invalid expression, assumed zero
Reply
#6

bump
Reply
#7

Look my code then look yours.. Before you try to script, try to read properly.
Reply
#8

Quote:
Originally Posted by paytas
Look my code then look yours.. Before you try to script, try to read properly.
if i try to use your code it gives me 26 errors
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)