06.07.2009, 21:57
pawn Код:
if(IsInCheckPoint[playerid] == 1)
{
switch(text)
{
case 0:
{
if (strcmp(text,"1",true) == 0)
{
new Playermoney = GetPlayerMoney(playerid);
if (Playermoney > 900)
{
SendClientMessage(playerid,0x38FF06FF,"[DEBUG] DEAGLE");
GivePlayerMoney(playerid, -900);
GivePlayerWeapon(playerid,24,120);
IsInCheckPoint[playerid] = 1;
return false;
}
else
{
SendClientMessage(playerid, 0x000000, "You don't have 900$.");
}
}
case 1:
{
if(strcmp(text,"2",true) == 0)
{
if( Playermoney > 1000 )
{
SendClientMessage(playerid,0x38FF06FF,"Selection 2");
IsInCheckPoint[playerid] = 1;
return false;
}
else
{
SendClientMessage(playerid, 0x000000, "You don't have 1000$");
}
}
}
return true;
}
error 033: array must be indexed (variable "-unknown-") switch(text)
error 014: invalid statement; not in switch case 1
error 001: expected token: ";", but found ":" case 1
error 029: invalid expression, assumed zero case 1
fatal error 107: too many error messages on one line case 1