[HELP] Argument Type Mismatch
#1

PHP код:
new id;
// this line v
if(sscanf(params"u"id)) return SendClientMessageEx(playeridCOLOR_GREY"Usage: /acceptrelease [player]"); 
PHP код:
./includes/updates/prison_system.pwn(1858) : error 035argument type mismatch (argument 1
pls halp
+1
Reply
#2

show
SendClientMessageEx
and
definition COLOR_GREY
Reply
#3

Can you show the whole command?
Reply
#4

Show us the definition of SendClientMessageEx. Other than that I don't see anything.
Reply
#5

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
show
SendClientMessageEx
and
definition COLOR_GREY
Those are not the issue as I've successful used them in other commands.

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
Can you show the whole command?
Sure
PHP код:
command(acceptreleaseplayeridparams)
{
    if(!
IsADocGuard(playerid)) return SendClientMessageEx(playeridCOLOR_GREY"You must be a DOC Guard to use this command.");
    new 
id;
    
    if(
sscanf(params"u"id)) return SendClientMessageEx(playeridCOLOR_GREY"Usage: /acceptrelease [player]");
    
    if(
strfind(PlayerInfo[id][pPrisonReason], "[DNRL]"true) == -1)
    {
        new 
string[128];
        
ReleasePlayerFromPrison(playerid);
        
format(stringsizeof(string), "You have accepted %s's release request."GetPlayerNameEx(id));
        
SendClientMessageEx(playeridCOLOR_GREYstring);
    }
    else 
SendClientMessage(playeridCOLOR_GRAD1"You cannot use this command on an inmate who has not served their initial sentence.");
    return 
1;

Reply
#6

PHP код:
change
if(sscanf(params"u"giveplayerid)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /cuff [player]"); 
to
if(sscanf(params"u"id)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /cuff [player]"); 
Reply
#7

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
change
if(sscanf(params"u"giveplayerid)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /cuff [player]"); 
to
if(sscanf(params"u"id)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /cuff [player]"); 
That wasn't suppose to be there, I was comparing the two to see if there was a difference, I forgot to delete that when I pasted it.
Reply
#8

Try
pawn Код:
command(acceptrelease, playerid, params)
to
pawn Код:
command(acceptrelease, playerid, params[])
Just an idea, maybe it helps
Reply
#9

PHP код:

command
(acceptreleaseplayeridparams

command(acceptreleaseplayeridparams[])  // <-- [] 
Reply
#10

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:

command
(acceptreleaseplayeridparams
command(acceptreleaseplayeridparams[])  // <-- [] 


Gracias, REP+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)