Could someone assist me? (Simple function issue) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Could someone assist me? (Simple function issue) (
/showthread.php?tid=562792)
Could someone assist me? (Simple function issue) -
Dokins - 11.02.2015
pawn Код:
IsMaxDamageWep(weaponid);
{
new rst = -1;
switch(weaponid)
{
case 24, 27, 30, 31, 32, 33 ,34, 35, 38;
{
rst = 1;
}
else
{
rst = 0;
}
}
return rst;
}
Returns function not implemented.
Re: Could someone assist me? (Simple function issue) -
HazardouS - 11.02.2015
Remove the ';' on the first line and replace the ';' on the 'case' line with ':'.
Re: Could someone assist me? (Simple function issue) -
CalvinC - 11.02.2015
Use "case:" not "case;", and instead of "else" use "default:".
pawn Код:
IsMaxDamageWep(weaponid);
{
new rst = -1;
switch(weaponid)
{
case 24, 27, 30, 31, 32, 33, 34, 35, 38: rst = 1;
default: rst = 0;
}
return rst;
}
Re: Could someone assist me? (Simple function issue) -
Kar - 11.02.2015
Quote:
Originally Posted by CalvinC
Use "case:" not "case;", and instead of "else" use "default:".
pawn Код:
IsMaxDamageWep(weaponid); { new rst = -1; switch(weaponid) { case 24, 27, 30, 31, 32, 33, 34, 35, 38: rst = 1; default: rst = 0; } return rst; }
|
Lol you forgot something...
pawn Код:
IsMaxDamageWep(weaponid)
{
new rst = -1;
switch(weaponid)
{
case 24, 27, 30, 31..35, 38: rst = 1;
default: rst = 0;
}
return rst;
}