Help me with this simple code.
#1

Help me with this when i try to compile i get errors
Код:
#include <a_samp>
#include <zcmd>

new Random;


public OnFilterScriptInIt()
{
      return 1;
}

public OnFilterScriptExit()
{
      return 1;
}

COMMAND:gifts(playerid, params[])
{
     
     
            Random = random(3);
            switch(Random)
            {
                  case 0: // By Oxgenated                  {
                          GivePlayerMoney(playerid, 200);
                          SendClientMessage(playerid, -1, "You opened a gift and received $200.");
                  }
                  case 1: // Let's add some score to the user!
                  {
                          SetPlayerScore(playerid, GetPlayerScore(playerid)+2);
                          SendClientMessage(playerid, -1, "You opened a gift and received score.");
                  }
                  case 2: // By Oxygenated
                  {
                           GivePlayerMoney(playerid, 500);
                          SendClientMessage(playerid, -1, "You opened a gift and received $500.");
                  }
            }
     
     return 1;
}
PHP код:
C:\Users\Karan\Desktop\Samp\pawno\include\zcmd.inc(96) : warning 217loose indentation
C
:\Users\Karan\Desktop\Samp\pawno\include\zcmd.inc(97) : warning 217loose indentation
C
:\Users\Karan\Desktop\Samp\pawno\include\zcmd.inc(98) : warning 217loose indentation
C
:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(7) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInIt")
C:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(26) : error 002only a single statement (or expressioncan follow each "case"
C:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(26) : warning 215expression has no effect
C
:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(28) : error 010invalid function or declaration
C
:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(33) : error 010invalid function or declaration
C
:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(40) : error 010invalid function or declaration
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase 
Reply


Messages In This Thread
Help me with this simple code. - by Oxygenated - 12.09.2017, 14:28
Re: Help me with this simple code. - by Kane - 12.09.2017, 15:39
Re: Help me with this simple code. - by Oxygenated - 12.09.2017, 15:43
Re: Help me with this simple code. - by Meller - 12.09.2017, 15:44
Re: Help me with this simple code. - by Oxygenated - 12.09.2017, 15:48

Forum Jump:


Users browsing this thread: 1 Guest(s)