26.10.2010, 07:58
i was wondering... how can i make this minigame...
on top:
in ongamemodeint:
and in Goldpot
and
i got some erros:
error line is here:
on top:
pawn Код:
new goldpotpickup;
pawn Код:
SetTimer("GoldPot", 180000, true);
pawn Код:
forward GoldPot(playerid);
public GoldPot(playerid)
{
switch(random(4))//
{
if(case 0)
{
//my funct here
}
else if(case 1)
{
//my funct here
}
else if(case 2)
{
//my funct here
}
else if(case 3)
{
//my funct here
}
}
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == goldpotpickup)
{
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
DestroyPickup(goldpotpickup);
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has Won Goldpot! ($10000+1 score)!",name);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
return 0;
}
Код:
(592): error 002: only a single statement (or expression) can follow each "case" (592) : error 029: invalid expression, assumed zero (592) : error 029: invalid expression, assumed zero (592) : fatal error 107: too many error messages on one line
pawn Код:
forward GoldPot(playerid);
public GoldPot(playerid)
{
switch(random(4))//
{
if(case 0) //error line
{
//myfucnt
}
else if(case 1)
{
//myfunct
}
else if(case 2)
{
//myfunct
}
else if(case 3)
{
//myfunct
}
}
}