SA-MP Forums Archive
Warning 209 - 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: Warning 209 (/showthread.php?tid=443903)



Warning 209 - Jizz - 14.06.2013

Код:
warning 209: function "cmd_cmh" should return a value
Here's the scripts
pawn Код:
CMD:cmh(playerid)
{
    for(new msg; msg < 51; msg++)
    return 1;
}



Re: Warning 209 - Red_Dragon. - 14.06.2013

You're using a wrong syntax for ZCMD. replace your code with this (the correct syntax)
pawn Код:
CMD:cmh(playerid, params[])
{
    for(new msg; msg < 51; msg++)
    return 1;
}



Re: Warning 209 - Sandiel - 14.06.2013

pawn Код:
CMD:cmh(playerid)
to
pawn Код:
CMD:cmh(playerid, params[])
And it'll work fine, be more carefull in the future, hope this helps.


Re: Warning 209 - Jizz - 14.06.2013

i changed the code, but "warning 209: function "cmd_cmh" should return a value"


Re: Warning 209 - gtakillerIV - 14.06.2013

Код:
for(new msg; msg < 51; msg++)
Continue what you were doing ?

EDIT: If you want "msg" to be 51 then just use "msg = 51;" no need to loop.