argument type mismatch (argument 3)
#1

Help me, i got error on line 23 and 31 in DCC.inc
PHP код:
public SendDC(channel[], const fmat[], va_args<>)
{
    new
        
str[145];
    
va_format(strsizeof (str), fmatva_start<2>); //23
    
BotChannel DCC_FindChannelById(channel);
    return 
DCC_SendChannelMessage(BotChannelstr);
}
public 
SendDCByName(channel[], const fmat[], va_args<>)
{
    new
        
str[145];
    
va_format(strsizeof (str), fmatva_start<2>); //31
    
BotChannel DCC_FindChannelByName(channel);
    return 
DCC_SendChannelMessage(BotChannelstr);

Reply
#2

You can't modify constant variable (string, Float, intenger or w/e). Remove const keyword on both function header.
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
You can't modify constant variable (string, Float, intenger or w/e). Remove const keyword on both function header.
I got error like this:
Код:
function heading differs from prototype (Line 19)
function heading differs from prototype (Line 27)
PHP код:
public SendDC(channel[], fmat[], va_args<>) //19
{
    new
        
str[145];
    
va_format(strsizeof (str), fmatva_start<2>);
    
BotChannel DCC_FindChannelById(channel);
    return 
DCC_SendChannelMessage(BotChannelstr);
}
public 
SendDCByName(channel[], fmat[], va_args<>)//27
{
    new
        
str[145];
    
va_format(strsizeof (str), fmatva_start<2>);
    
BotChannel DCC_FindChannelByName(channel);
    return 
DCC_SendChannelMessage(BotChannelstr);

Reply
#4

You have to edit the forwarded prototype when you are editing the prototype of the public function
Reply
#5

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
You have to edit the forwarded prototype when you are editing the prototype of the public function
Ohh it fixed... sorry, i forgot to remove "const" at "forward", i just remove "const" at public lol
Reply
#6

Quote:
Originally Posted by AlfaSufaIndo
Посмотреть сообщение
Ohh it fixed... sorry, i forgot to remove "const" at "forward", i just remove "const" at public lol
That's what I said with different words :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)