27.10.2017, 08:21
NOTE: i posted this in Discord Plugin thread but didn't get the help i needed.
Someone told me to remove 'const' from
but i get this error
[Below is what i posted in the Discord plugin thread]
Hey..
Line for error ^:
Tried my best to figure it, any help please?
Someone told me to remove 'const' from
PHP Code:
const message[]
Code:
error 025: function heading differs from prototype
Hey..
PHP Code:
public DCC_OnChannelMessage(DCC_Channel:channel, DCC_User:author, const message[])
{
new channel_name[32], test[128], str[128];
DCC_GetChannelName(channel, channel_name);
new user_name[32 + 1];
DCC_GetUserName(author, user_name);
if(!DCC_GetChannelName(channel, channel_name))
{
if(!strcmp(message, "!say", false, 2))
{
if(sscanf(message, "s[128]", test))
return 0;
format(str, sizeof(str), "%s", test);
DCC_SendChannelMessage(Echo, str);
return 1;
}
}
return 1;
}
Code:
error 035: argument type mismatch (argument 1)
PHP Code:
if(sscanf(message, "s[128]", test))