SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 15/06/2018, 04:32 AM   #1
div
Big Clucker
 
Join Date: Dec 2017
Location: Rajasthan ka chorra :P
Posts: 161
Reputation: 5
Default : error 035: argument type mismatch (argument 3)

Code:
CMD:changepass(playerid, params[])
{
    new player[MAX_PLAYER_NAME],string[256]; // the player name, // and the string for the path
    if(sscanf(params, "s[256]", params))return SendClientMessage(playerid, -1, "/changepassword [password]");//sscanf, what ever u write after /change
    format(string, 256, "Users/%s.ini", player);//put ur ini path here but keep the player
    new INI:file = INI_Open(string); // opening the path
    INI_WriteString(file,  "Password", udb_hash(params));//writing in the path
    INI_Close(file);// close the file
    return 1;

}


Code:
C:\Users\div\Desktop\sampsv\gamemodes\cnr1.pwn(584) : error 035: argument type mismatch (argument 3)
div is offline   Reply With Quote
Old 15/06/2018, 04:48 AM   #2
TadePoleMG
Big Clucker
 
TadePoleMG's Avatar
 
Join Date: Apr 2018
Location: Uttar Pradesh, India
Posts: 149
Reputation: 2
Default Re: : error 035: argument type mismatch (argument 3)

GetPlayerName missing.
__________________
-| Gaming 'N' Scripting |-
TadePoleMG is offline   Reply With Quote
Old 15/06/2018, 04:59 AM   #3
div
Big Clucker
 
Join Date: Dec 2017
Location: Rajasthan ka chorra :P
Posts: 161
Reputation: 5
Default Re: : error 035: argument type mismatch (argument 3)

can u show me please? im rookie :/
div is offline   Reply With Quote
Old 15/06/2018, 05:07 AM   #4
TadePoleMG
Big Clucker
 
TadePoleMG's Avatar
 
Join Date: Apr 2018
Location: Uttar Pradesh, India
Posts: 149
Reputation: 2
Default Re: : error 035: argument type mismatch (argument 3)

new player[MAX_PLAYER_NAME];
GetPlayerName(playerid, player, MAX_PLAYER_NAME);
__________________
-| Gaming 'N' Scripting |-
TadePoleMG is offline   Reply With Quote
Old 15/06/2018, 05:14 AM   #5
div
Big Clucker
 
Join Date: Dec 2017
Location: Rajasthan ka chorra :P
Posts: 161
Reputation: 5
Default Re: : error 035: argument type mismatch (argument 3)

still not working :/
div is offline   Reply With Quote
Old 15/06/2018, 05:14 AM   #6
jlalt
High-roller
 
Join Date: Oct 2014
Posts: 1,399
Reputation: 342
Default Re: : error 035: argument type mismatch (argument 3)

You're using ini write string while udb_hash return value is integer.

PHP Code:
CMD:changepass(playeridparams[])
{
    new 
player[MAX_PLAYER_NAME],string[256]; // the player name, // and the string for the path
    
if(sscanf(params"s[256]"params))return SendClientMessage(playerid, -1"/changepassword [password]");//sscanf, what ever u write after /change
    
GetPlayerName(playeridplayerMAX_PLAYER_NAME);
    
format(string256"Users/%s.ini"player);//put ur ini path here but keep the player
    
new INI:file INI_Open(string); // opening the path
    //INI_WriteString(file,  "Password", udb_hash(params));//writing in the path
    
INI_WriteInt(file"Password"udb_hash(params));
    
INI_Close(file);// close the file
    
return 1;


jlalt is offline   Reply With Quote
Old 15/06/2018, 05:20 AM   #7
div
Big Clucker
 
Join Date: Dec 2017
Location: Rajasthan ka chorra :P
Posts: 161
Reputation: 5
Default Re: : error 035: argument type mismatch (argument 3)

thanks bro! +rep
div 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
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 01:40 PM.


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