02.12.2009, 14:38
(11479) : error 002: only a single statement (or expression) can follow each "case"
(11479) : warning 215: expression has no effect
(11481) : warning 217: loose indentation
(11489) : warning 217: loose indentation
11447 -- 11486:
I searched the forums about that error but didn't find any solution with this problem. How to fix that? Thank you very much.
OT: 1336th page of this forum n_n
(11479) : warning 215: expression has no effect
(11481) : warning 217: loose indentation
(11489) : warning 217: loose indentation
11447 -- 11486:
pawn Код:
if (CarJackingTimer == 0)
{
new Car = GetPlayerVehicleID(playerid), Model = GetVehicleModel(Car);
switch(Model)
{
case 400, 424, 470, 489, 495, 500, 505, 579:
{
new carprice = 8000 + random(3500);
SetVehicleToRespawn(Car);
format(string,sizeof(string),"[CAR JACKER:] You sold this jeep for %s.", carprice);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerCash(playerid, carprice);
CarJackingTimer = 20;
}
case 401, 404, 405, 410, 412, 413, 418, 419, 436, 440, 445, 458, 466, 467, 474, 554, 475, 479, 580, 482, 483, 491, 492, 566, 516, 517, 518, 526, 527, 529, 534, 540, 542, 543, 546, 547, 549, 550, 551, 567, 575, 576, 585, 589, 600, 426:
{
new carprice = 2500 + random(3500);
SetVehicleToRespawn(Car);
format(string,sizeof(string),"[CAR JACKER:] You sold this saloon for %s.", carprice);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerCash(playerid, carprice);
CarJackingTimer = 20;
}
case 402, 409, 411, 415, 429, 434, 439, 451, 477, 480, 506, 507, 535, 533, 536, 541, 545, 555, 558, 559, 560, 561, 562, 565, 587, 602, 603:
{
new carprice = 14000 + random(3500);
SetVehicleToRespawn(Car);
format(string,sizeof(string),"[CAR JACKER:] You sold this sports car for %s.", carprice);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerCash(playerid, carprice);
CarJackingTimer = 20;
}
}
SendClientMessage(playerid, COLOR_WHITE, "[ERROR:] You can't sell this car.");
}
else
{
format(string,sizeof(string),"[ERROR:] You need to wait %s more minutes.", CarJackingTimer);
SendClientMessage(playerid, COLOR_WHITE, string);
}
OT: 1336th page of this forum n_n