12.09.2017, 14:28
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 217: loose indentation
C:\Users\Karan\Desktop\Samp\pawno\include\zcmd.inc(97) : warning 217: loose indentation
C:\Users\Karan\Desktop\Samp\pawno\include\zcmd.inc(98) : warning 217: loose 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 002: only a single statement (or expression) can follow each "case"
C:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(26) : warning 215: expression has no effect
C:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(28) : error 010: invalid function or declaration
C:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(33) : error 010: invalid function or declaration
C:\Users\Karan\Desktop\Samp\pawno\Getgift.pwn(40) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase