SA-MP Forums Archive
Mismatch script error - 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)
+--- Thread: Mismatch script error (/showthread.php?tid=610137)



Mismatch script error - Jigsaw123 - 20.06.2016

Hey guys, I've recently been playing around with my /report command, and When I made it into what I wanted it to be, I received this error:

Code:
C:\Users\Gabriel\Desktop\Community\Server\FC Server\gamemodes\rp.pwn(31593) : error 035: argument type mismatch (argument 1)
C:\Users\Gabriel\Desktop\Community\Server\FC Server\gamemodes\rp.pwn(31595) : error 035: argument type mismatch (argument 1)
C:\Users\Gabriel\Desktop\Community\Server\FC Server\gamemodes\rp.pwn(31597) : error 035: argument type mismatch (argument 1)
C:\Users\Gabriel\Desktop\Community\Server\FC Server\gamemodes\rp.pwn(31598) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
This is the Code 31593 - 31598

Code:
			SendClientMessage(aname, COLOR_RED, "______ REPORT ACCEPTED ______");
			format(string, sizeof(string), "Admin Name %s", AccountInfo[playerid][aName]);
			SendClientMessage(aname, COLOR_WHITE, string);
			format(string, sizeof(string), "Your Name %s",aname);
			SendClientMessage(aname, COLOR_WHITE, string);
			SendClientMessage(aname, COLOR_RED, "____________________________");



Re: Mismatch script error - semara123 - 20.06.2016

i think the correct is
pawn Code:
SendClientMessage(playerid, COLOR_RED, "______ REPORT ACCEPTED ______");
            format(string, sizeof(string), "Admin Name %s", AccountInfo[playerid][aName]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, sizeof(string), "Your Name %s",aname);
            SendClientMessage(playerid, COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_RED, "____________________________");



Re: Mismatch script error - Jigsaw123 - 20.06.2016

Nope, because It's meant to send the message to the player who has sent in the /report.


Re: Mismatch script error - semara123 - 20.06.2016

can you see us the command script?


Re: Mismatch script error - luke49 - 20.06.2016

You get these errors, because instead of ID of the player, you write the name of the player.

PHP Code:
new player_name[MAX_PLAYER_NAME];
GetPlayerName(playeridplayer_nameMAX_PLAYER_NAME);
SendClientMessage(playerid, -1"text"); 
or

PHP Code:
new 
    
player_name[MAX_PLAYER_NAME],
    
id;
GetPlayerName(idplayer_nameMAX_PLAYER_NAME);
SendClientMessage(id, -1"text");