Mismatch script error
#1

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, "____________________________");
Reply
#2

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, "____________________________");
Reply
#3

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

can you see us the command script?
Reply
#5

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"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)