Custom function - 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: Custom function (
/showthread.php?tid=665143)
Custom function -
SymonClash - 23.03.2019
Just made this quick function when executing a command with params:
pawn Code:
stock SendUsageMessage(playerid, message[])
{
SCMEX(playerid, COLOR_BELGREEN, "» [USAGE]: %s", message);
}
SCMEX = SendClientMessageEx.
In a command:
pawn Code:
if(sscanf(params,"r", id)) return SendUsageMessage(playerid, "/spec [playerid/name]");
Got this error:
warning 209: function "SendUsageMessage" should return a value
Re: Custom function -
NaS - 23.03.2019
You return SendUsageMessage's value but it doesn't return anything specific.
Re: Custom function -
Hazon - 23.03.2019
Maybe ?
Code:
stock SendUsageMessage(playerid, message[]){ SCMEX(playerid, COLOR_BELGREEN, "» [USAGE]: %s", message);
return 1;
}
Re: Custom function -
SymonClash - 23.03.2019
Yeah just noticed it. Thanks.