Help me
#6

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;
}
Ok I tried that But I get errors


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
Reply


Messages In This Thread
Help me - by 6tynine - 06.07.2009, 21:34
Re: Help me - by Correlli - 06.07.2009, 21:38
Re: Help me - by 6tynine - 06.07.2009, 21:39
Re: Help me - by refshal - 06.07.2009, 21:40
Re: Help me - by 6tynine - 06.07.2009, 21:40
Re: Help me - by 6tynine - 06.07.2009, 21:57
Re: Help me - by BMUK - 06.07.2009, 22:04
Re: Help me - by 6tynine - 06.07.2009, 22:11

Forum Jump:


Users browsing this thread: 2 Guest(s)