SA-MP Forums Archive
Weird problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weird problem (/showthread.php?tid=181265)



Weird problem - Scriptissue - 04.10.2010

I made Ajail script, and I was working on the message to all, and it doesn't work.
This is just the message part, everything is defined and works but the message.
pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s was admin jailed by %s for %s minutes, Reason: %s ",GivenName, sendername, jailTime, jailReason );
error line:        SendClientMessageToAll(playerid, 0xFF4646FF, string);

    }



    return 1;
}
pawn Код:
error 035: argument type mismatch (argument 2)



Re: Weird problem - Double-O-Seven - 04.10.2010

Remove 'playerid, '.


Re: Weird problem - Bumbis - 04.10.2010

pawn Код:
format(string, sizeof(string), "%s was admin jailed by %s for %d minutes, Reason: %s ",GivenName, sendername, jailTime, jailReason );
I think this will be better.


Re: Weird problem - Scriptissue - 04.10.2010

Still, the problem happens when I add messagetoall.


Re: Weird problem - Scriptissue - 04.10.2010

Anyone ? please can you help me ?


Re: Weird problem - samgreen - 04.10.2010

Read the responses! Remove "playerid, "


Re: Weird problem - smeti - 04.10.2010

http://wiki.sa-mp.co/wiki/SendClientMessageToAll
pawn Код:
SendClientMessageToAll(color, const message[]);
https://sampwiki.blast.hk/wiki/SendClientMessage
pawn Код:
SendClientMessage(playerid, color, const message[]);



Re: Weird problem - Scriptissue - 05.10.2010

Doesn't work, can anyone help ? It doesn't send the message I want the message to be with the Format, can any one help ?


Re: Weird problem - LarzI - 05.10.2010

The solution has been posted 2 times already, learn to fucking read.

pawn Код:
//SendClientMessageToAll(playerid, 0xFF4646FF, string); REMOVE 'playerid, '
SendClientMessageToAll(0xFF4646FF, string);



Respuesta: Weird problem - almighty - 05.10.2010

Here... Use this

Код:
        GetPlayerName(playerid, sendername, sizeof(sendername)); 
        format(string, sizeof(string), "%s was admin jailed by %s for %s minutes, Reason: %s ",GivenName, sendername, jailTime, jailReason );
        SendClientMessageToAll(0xFF4646FF, string);

    }
    return 1;
}