SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 19/03/2020, 04:27 PM   #1
aVa57
Little Clucker
 
Join Date: Mar 2020
Posts: 18
Reputation: 0
Post PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

#define FILTERSCRIPT

#include <a_samp>
#include <ZCMD>
#include <sscanf2>


#if defined FILTERSCRIPT


#endif
new lastskin;
new duty = 0;
new wantedlevel;


CMD:duty(playerid , params[])
{
if (IsPlayerAdmin(playerid))


{

lastskin = GetPlayerSkin(playerid);

SetPlayerArmour(playerid, 100);

SetPlayerSkin(playerid, 280);

GivePlayerWeapon(playerid , 24 , 500);

SendClientMessage(playerid , -1 , "[POLICE]Esti la datorie!");

SetPlayerColor(playerid , 0x0335ffFF);

duty = 1;

return 1;

}

else

{

SendClientMessage(playerid , -1 , "Nu ai functia de politist.");

}
return 1;

}

CMDffduty(playerid , params[])
{

SendClientMessage(playerid , -1 , "[POLICE]Nu mai esti la datorie!");

SetPlayerSkin(playerid, lastskin);

SetPlayerArmour(playerid, 0);

ResetPlayerWeapons(playerid);

SetPlayerColor(playerid , -1 );

duty = 0;
return 1;

}


CMD:wanted(playerid , params[])
{
if (IsPlayerAdmin(playerid))
{
if (duty == 1)
{
new targetid;


if(sscanf(params,"d", targetid)) return SendClientMessage(playerid,-1 ,"USAGE: /wanted [id]");

else if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Acel player nu este online");

wantedlevel = GetPlayerWantedLevel(targetid);

SendClientMessage(playerid , -1 , wantedlevel);



return 1;

}

else

{

SendClientMessage(playerid , -1 , "[POLICE]Nu esti la datorie!");
}//////



}//////////////



return 1;



}////////
aVa57 is offline   Reply With Quote
Old 19/03/2020, 04:53 PM   #2
HudsonBrandao
Little Clucker
 
Join Date: Jan 2020
Location: Tres Lagoas MS
Posts: 30
Reputation: 0
Default Re: PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

what line is this error happening?
HudsonBrandao is offline   Reply With Quote
Old 19/03/2020, 05:01 PM   #3
HudsonBrandao
Little Clucker
 
Join Date: Jan 2020
Location: Tres Lagoas MS
Posts: 30
Reputation: 0
Default Re: PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

if(sscanf(params,"d", targetid)) return SendClientMessage(playerid,-1 ,"USAGE: /wanted [id]");

else if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Acel player nu este online");

wantedlevel = GetPlayerWantedLevel(targetid);

SendClientMessage(playerid , -1 , wantedlevel);

substitute for this:
if(sscanf(params,"d", targetid)) return SendClientMessage(playerid,-1 ,"USAGE: /wanted [id]");

else if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Acel player nu este online");

wantedlevel = GetPlayerWantedLevel(targetid);

SendClientMessage(playerid , -1 ,"wantedlevel");

--
the problem is in this line: SendClientMessage (playerid, -1, wantedlevel);
BECAUSE YOU NEED TO PUT THE " " IN
wantedlevel
HudsonBrandao is offline   Reply With Quote
Old 19/03/2020, 05:14 PM   #4
aVa57
Little Clucker
 
Join Date: Mar 2020
Posts: 18
Reputation: 0
Default Re: PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

its at the line 88
aVa57 is offline   Reply With Quote
Old 19/03/2020, 05:19 PM   #5
aVa57
Little Clucker
 
Join Date: Mar 2020
Posts: 18
Reputation: 0
Default Re: PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

actually the wantedlevel is a variable which needs to be shown in the sent message to the player
aVa57 is offline   Reply With Quote
Old 19/03/2020, 05:29 PM   #6
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,737
Reputation: 583
Default Re: PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

If you want to show values (like wantedlevel) in text you need to format it into a string first:

Code:
new text[30];
format(text, sizeof(text), "Wanted Level: %d", wantedlevel);
SendClientMessage(playerid, -1, text);
%d will get replaced with whatever wantedlevel's value is and saved into the text array as string, then the text can be shown with SendClientMessage.
NaS is offline   Reply With Quote
Old 19/03/2020, 05:42 PM   #7
aVa57
Little Clucker
 
Join Date: Mar 2020
Posts: 18
Reputation: 0
Default Re: PLEASE HELP! (88) : error 035: argument type mismatch (argument 3)

Thanks alot!!! +rep
aVa57 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 035: argument type mismatch (argument 1)/(argument 2) DavidGravelli Scripting Help 3 08/03/2019 11:42 AM
D:\server\gamemodes\ExtremeGame.pwn(22326) : error 035: argument type mismatch (argument 2) enzulikeS Scripting Help 2 25/04/2018 03:38 PM
C:\Users\Lirbo\Desktop\Roleplay\gamemodes\ERP.pwn( 19) : error 035: argument type mismatch (argument 1) Lirbo Scripting Help 2 12/12/2014 02:51 PM
error 35: Argument Type Mismatch (argument 2) Forbidden Name System Stoyanov Scripting Help 2 01/11/2014 08:50 PM
error 035: argument type mismatch (argument 2) [Using MySQL R7/R8 With Cache] viveka27 Scripting Help 1 21/05/2013 03:31 PM


All times are GMT. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.