SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/07/2017, 04:34 PM   #1
TomRedlake
Big Clucker
 
TomRedlake's Avatar
 
Join Date: Feb 2013
Location: Croatia
Posts: 139
Reputation: 6
Default error 035: argument type mismatch (argument 2)

Code:
stock BanPlayer(playerid, Admin, const reason[])
{
     new
       string[150],
       Month,
       Day,
       Year,
       name[MAX_PLAYER_NAME],
       adminname[MAX_PLAYER_NAME],
       File:banlog;
     getdate(Year, Month, Day);
     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
     GetPlayerName(Admin, adminname, MAX_PLAYER_NAME);
     format(string, sizeof(string), "%s banned by %s[Reason: %s\r][Date: %d/%d/%d]\n", name, adminname, reason, Day, Month, Year);
     banlog = fopen("BanLog.txt", io_append);
     fwrite(banlog, string);
     fclose(banlog);
     PlayerInfo[playerid][pBanned] = 1;
     return Kick(playerid);
}
Line:
Code:
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
		{
			new Admin[24] = "Anti-cheat";
			new bannednamejetpack[MAX_PLAYER_NAME], jetpackbanstring[300 + MAX_PLAYER_NAME];
    		GetPlayerName(i, bannednamejetpack, sizeof(bannednamejetpack));
    		format(jetpackbanstring, sizeof(jetpackbanstring), "Anti-cheat: %s has been banned from the server {FFFFFF}[Reason: Jetpack hack]", bannednamejetpack);
    		SendClientMessageToAll(COR_VERMELHO, jetpackbanstring);
    		BanPlayer(i,Admin,reason3);
		}
Help please :/
__________________
TomRedlake is offline   Reply With Quote
Old 22/07/2017, 05:20 PM   #2
skuller12
Big Clucker
 
Join Date: Feb 2015
Location: Galati, Romania
Posts: 101
Reputation: 0
Default Re: error 035: argument type mismatch (argument 2)

----
skuller12 is offline   Reply With Quote
Old 22/07/2017, 05:20 PM   #3
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Re: error 035: argument type mismatch (argument 2)

If you think you deserve help (which i think u do not), do something for it, like marking the problematic lines ...

and what skuller said is bullshit
BiosMarcel is offline   Reply With Quote
Old 22/07/2017, 05:47 PM   #4
iLearner
Gangsta
 
iLearner's Avatar
 
Join Date: Apr 2017
Posts: 576
Reputation: 134
Default Re: error 035: argument type mismatch (argument 2)

stock BanPlayer(playerid, Admin[], const reason[])

PS: you can just do: BanPlayer(i,"AntiCheat", "Jetpack Hacks");
iLearner is offline   Reply With Quote
Old 22/07/2017, 06:15 PM   #5
TomRedlake
Big Clucker
 
TomRedlake's Avatar
 
Join Date: Feb 2013
Location: Croatia
Posts: 139
Reputation: 6
Default Re: error 035: argument type mismatch (argument 2)

Thanks iLearner
__________________
TomRedlake is offline   Reply With Quote
Old 22/07/2017, 06:18 PM   #6
Paulice
Huge Clucker
 
Join Date: Jul 2017
Posts: 420
Reputation: 44
Default Re: error 035: argument type mismatch (argument 2)

Quote:
Originally Posted by TomRedlake View Post
Thanks iLearner
Your function is still using Admin as an integer in it.

PHP Code:
GetPlayerName(AdminadminnameMAX_PLAYER_NAME); 
Paulice 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
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
Help plox(error 035: argument type mismatch (argument 2) TheTerminator Scripting Help 2 18/11/2011 05:54 PM


All times are GMT. The time now is 12:12 AM.


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