27.02.2010, 20:29
Ok so I'm using zcmd and my code goes like
Yet when I try compile, I get told
I see that you're not allowed to use words in cases, but I don't know how to fix it. Help please
pawn Код:
zcmd(weap,playerid,params[])
{
new weapon;
if(!sscanf(params,"s",weapon))
{
switch(weapon)
{
case uzi: GivePlayerWeapon(playerid,28,500);
case microsmg: GivePlayerWeapon(playerid,28,500);
case m4: GivePlayerWeapon(playerid,31,500);
case sniper: GivePlayerWeapon(playerid,34,500);
case minigun: if(IsPlayerLuxAdmin(playerid))
{
GivePlayerWeapon(playerid,38,1500);
}
case knife: GivePlayerWeapon(playerid,4,1);
}
return 1;
}
else SendClientMessage(playerid,COLOR_RED,"USAGE: /weap [weapon name]");
return 1;
}
Код:
G:\Program Files\Rockstar Games\SA-MP Server 0.3a\gamemodes\hydra.pwn(1094) : error 017: undefined symbol "uzi" G:\Program Files\Rockstar Games\SA-MP Server 0.3a\gamemodes\hydra.pwn(1095) : error 017: undefined symbol "microsmg" G:\Program Files\Rockstar Games\SA-MP Server 0.3a\gamemodes\hydra.pwn(1096) : error 017: undefined symbol "m4" G:\Program Files\Rockstar Games\SA-MP Server 0.3a\gamemodes\hydra.pwn(1097) : error 017: undefined symbol "sniper" G:\Program Files\Rockstar Games\SA-MP Server 0.3a\gamemodes\hydra.pwn(1098) : error 017: undefined symbol "minigun" G:\Program Files\Rockstar Games\SA-MP Server 0.3a\gamemodes\hydra.pwn(1102) : error 017: undefined symbol "knife" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.