Argument type mismatch.
#1

I made this code the same does not work correctly why?

Код:
\gamemode RP\gamemodes\Roleplay.pwn(853) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Quote:
Originally Posted by SukMathcuck
Посмотреть сообщение
I made this code the same does not work correctly why?

Код:
\gamemode RP\gamemodes\Roleplay.pwn(853) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
PHP код:
static stock SendAdminMessage(color, const str[], nivel)
{
    foreach(new 
iPlayer)
    {
       if(
Account[i][pAdmin] >= nivelSendSplitClientMessage(icolorstr); //error
    
}
    
printf("%s"str);
    return 
1;
}
stock SendSplitClientMessage(playeridcolortext[], minlen 110maxlen 120)
{
    new 
str[256];
    if(
strlen(text) > maxlen)
    {
        new 
pos maxlen;
        while(
text[--pos] > ' ') {}
        if(
pos minlenpos maxlen;
        
format(strsizeof(str), "%.*s ..."postext);
        
SendClientMessage(playeridcolorstr);
        
format(strsizeof(str), ".... %s"text[pos+1]);
        
SendClientMessage(playeridcolorstr);
    }
    else 
format(strsizeof(str), "%s"text), SendClientMessage(playeridcolorstr);
    return 
true;

static stock SendAdminMessage(color, const str[], nivel)
so str is a constant

stock SendSplitClientMessage(playerid, color, text[], minlen = 110, maxlen = 120)
but here the text[] is not, that's a argument type mismatch

just add "const" to text[]
stock SendSplitClientMessage(playerid, color, const text[], minlen = 110, maxlen = 120)
Reply
#3

reputed, topic closed, error fixed.
Reply
#4

Quote:
Originally Posted by SukMathcuck
Посмотреть сообщение
reputed, topic closed, error fixed.
Don't remove code (Rule breaker)

if someone have same problem he can fix it with this exemple
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)