SA-MP Forums Archive
How to ignore warnings? - 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: How to ignore warnings? (/showthread.php?tid=310247)



How to ignore warnings? - Outcast - 11.01.2012

Is it possible to make the compiler ignore the warnings, and doesn't shows them every time I compile a FS?

Код:
warning 209: function "cmd_engine" should return a value
I know, simple Return 1; at the bottom of the command would fix it, but I need it not to return anything.


Re: How to ignore warnings? - Mean - 11.01.2012

Just fix it. There's no other way.


Re: How to ignore warnings? - Outcast - 11.01.2012

I need it not to return anything, because I have a same command in the game mode, and if the engine command returns 1 in the FS, the game mode one doesn't even get checked.


Re: How to ignore warnings? - Konstantinos - 11.01.2012

It should return a value, to stop the command.
If you don't like like this.
pawn Код:
CMD:kill(playerid, params[])
{
    SetPlayerHealth(playerid, 0.0);
    return 1;
}
You can make it like that.
pawn Код:
CMD:kill(playerid, params[])
{
    return SetPlayerHealth(playerid, 0.0);
}
But it's nessecasy to return a value for a command or Callback.


Re: How to ignore warnings? - Calgon - 11.01.2012

return 0 instead of 1.


AW: How to ignore warnings? - Babul - 11.01.2012

there is the -w (suppress warning) parameter for the compiler, use it like
Код:
-w203
in the compile options.