SA-MP Forums Archive
[HELP] Argument Type Mismatch - 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: [HELP] Argument Type Mismatch (/showthread.php?tid=594972)



[HELP] Argument Type Mismatch - BornHuman - 26.11.2015

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


Re: [HELP] Argument Type Mismatch - AbyssMorgan - 26.11.2015

show
SendClientMessageEx
and
definition COLOR_GREY


Re: [HELP] Argument Type Mismatch - TwinkiDaBoss - 26.11.2015

Can you show the whole command?


Re: [HELP] Argument Type Mismatch - Crayder - 26.11.2015

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


Re: [HELP] Argument Type Mismatch - BornHuman - 26.11.2015

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;




Re: [HELP] Argument Type Mismatch - AbyssMorgan - 26.11.2015

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



Re: [HELP] Argument Type Mismatch - BornHuman - 26.11.2015

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.


Re: [HELP] Argument Type Mismatch - TwinkiDaBoss - 26.11.2015

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


Re: [HELP] Argument Type Mismatch - AbyssMorgan - 26.11.2015

PHP код:

command
(acceptreleaseplayeridparams

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



Re: [HELP] Argument Type Mismatch - BornHuman - 26.11.2015

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

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


Gracias, REP+