17.07.2011, 21:18
Hello, I have got an error in this code. What's the mistake, or as a case I can't put Variables?
Thanks in advance.
pawn Код:
HInsurancePickup=CreatePickup(1239, 1, 1619.2758,1821.2875,10.8203);// Health Insurance
CreditCardPickup=CreatePickup(1239, 1, 2316.6211,-9.9971,26.7422);// CreditCart
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
switch(pickupid)
{
case HInsurancePickup:// ERROR is here
{
new string[20];
format(string,sizeof(string),"~g~Price:$%d",floatround((50*gSettings[COEFFICIENT]+50*gSettings[COEFFICIENT]*gSettings[VAT_NUMBER]),floatround_round));
GameTextForPlayer(playerid, string, 3000, 1);
}
case CreditCardPickup: // ERROR is here
{
new string[20];
format(string,sizeof(string),"~g~Price:$%d",floatround((167.6666666666666666666666666666*gSettings[COEFFICIENT]+166.6666666666666666666666666666667*gSettings[COEFFICIENT]*gSettings[VAT_NUMBER]),floatround_round));
GameTextForPlayer(playerid, string, 3000, 1);
}
}
return 1;
}
Quote:
error 008: must be a constant expression; assumed zero |