Sending string to function?
#1

I'm trying to send a string to a function I got
pawn Code:
SendAdminWarning(hackstring);
pawn Code:
function SendAdminWarning(msg)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(AccountData[i][Admin] > 0)
        {
            SendClientMessage(i,COLOR_RED,msg);
        }
    }
}
However I am receiving errors on both of them the same just different arguments
1 and 3
Example:
pawn Code:
error 035: argument type mismatch (argument 3)
I suppose I'm doing something wrong here?
Reply
#2

yea you are.
Code:
function SendAdminWarning(msg[])
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(AccountData[i][Admin] > 0)
        {
            SendClientMessage(i,COLOR_RED,msg);
        }
    }
}
Reply
#3

Hehe thank you, funny enough right after posting this post it crossed my mind that, that was the issue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)