Thread: [Solved] argument type mismatch
View Single Post
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 12-03-2019 , 23:07   Re: argument type mismatch
Reply With Quote #3

PHP Code:
public MessageEveryone(message)

The compiler assumes that message is a single integer.

https://wiki.alliedmods.net/Pawn

PHP Code:
public MessageEveryone(message[])

Also, depending on what doMagic() is doing, you may want to also pass the length of the character array.

PHP Code:
public MessageEveryone(message[], len)
{
    for (new 
0g_MaxPlayersi++) {
        if (!
is_user_connected(i)) {
            continue;
        }
            
        
doMagic(imessagelenGREEN5.0);
    }

EDIT: also yeah loop through players how fysiks suggested. Your method would be correct in Sourcemod, but I guess it's a different story in AMX Mod X.
__________________

Last edited by ddhoward; 12-03-2019 at 23:09.
ddhoward is offline