Custom function
#1

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
Reply
#2

You return SendUsageMessage's value but it doesn't return anything specific.
Reply
#3

Maybe ?

Code:
stock SendUsageMessage(playerid, message[]){    SCMEX(playerid, COLOR_BELGREEN, "» [USAGE]: %s", message);
return 1;
}
Reply
#4

Yeah just noticed it. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)