argument type mismatch
#1

Код:
error 035: argument type mismatch (argument 2)
pawn Код:
public MSGPescarTime()
{
    new randpescar = random(sizeof(MSGPescar));
    SendClientMessage(COLOR_WHITE, MSGPescar[randpescar]);
    return 1;
}
Why give me these error? WTF !
Reply
#2

pawn Код:
SendClientMessage(COLOR_WHITE, MSGPescar[randpescar]); // It's SendClientMessage(playerid, COLOR_WHITE, MSGPescar[randpescar]);

// But in this case, there is no playerid, so why not use
SendClientMessageToAll(COLOR_WHITE, MSGPescar[randpescar]);
Reply
#3

How to make it to "SendClientMessasge"?
Reply
#4

Quote:
Originally Posted by monster010
Посмотреть сообщение
How to make it to "SendClientMessasge"?
pawn Код:
SendClientMessage(playerid, COLOR_WHITE, MSGPescar[randpescar]);
+Rep me if I helped you
Reply
#5

Quote:
Originally Posted by monster010
Посмотреть сообщение
How to make it to "SendClientMessasge"?
Either this way:

pawn Код:
forward MSGPescarTime(playerid);
public MSGPescarTime(playerid)
{
    new randpescar = random(sizeof(MSGPescar));
    SendClientMessage(playerid, COLOR_WHITE, MSGPescar[randpescar]);
    return 1;
}
or

pawn Код:
public MSGPescarTime()
{
    foreach(new i : Player)
    {
        new randpescar = random(sizeof(MSGPescar));
        SendClientMessage(i, COLOR_WHITE, MSGPescar[randpescar]);
    }
    // But it seriously doesn't make any sense, why not just use SendClientMessageToAll?
    return 1;
}
Reply
#6

Beceasue these messages doesn't not see all players.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)