SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 24/08/2011, 09:43 AM   #1
Wesley221
High-roller
 
Wesley221's Avatar
 
Join Date: Apr 2011
Posts: 2,736
Reputation: 714
Default Loading password in y_ini

Hey guys,
Im trying to store the playerpassword in a variable, but i dont really get it how to do that. I tried INI_String(); before, but that gave me the error "Undefined symbol". Zhero(not sure if thats the right name) said this can also be done by using INI_ParseFile();, but i dont really get how to use that.
Zhero also gave me a link to his FS which uses the INI_ParseFile(); aswell, but couldnt really get it how he used it.
Can anyone give me an hand how to get the player password using INI_ParseFile();?
Im using the variable PlayerInfo[playerid][pPass] to store the password in, if you wanna know that.
~Wesley
__________________
yes
Wesley221 is offline  
Old 24/08/2011, 09:47 AM   #2
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,525
Reputation: 2881
Default Re: Loading password in y_ini

"INI_String" gives an error if you don't include the destination array size.
Y_Less is offline  
Old 24/08/2011, 09:50 AM   #3
Wesley221
High-roller
 
Wesley221's Avatar
 
Join Date: Apr 2011
Posts: 2,736
Reputation: 714
Default Re: Loading password in y_ini

I did put the size after the enums.
Code:
enum P_INFO {
	pName[24], 
	pPass[MAXPSIZE], // MAXPSIZE == 16
}

INI_String("Name", PlayerInfo[playerid][pName]);
INI_String("Password", PlayerInfo[playerid][pPass]);

error 017: undefined symbol "INI_String"
error 017: undefined symbol "INI_String"
__________________
yes
Wesley221 is offline  
Old 24/08/2011, 09:52 AM   #4
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,525
Reputation: 2881
Default Re: Loading password in y_ini

Code:
INI_String("Name", PlayerInfo[playerid][pName], 24);
Y_Less is offline  
Old 24/08/2011, 09:53 AM   #5
Wesley221
High-roller
 
Wesley221's Avatar
 
Join Date: Apr 2011
Posts: 2,736
Reputation: 714
Default Re: Loading password in y_ini

Thanks!
That did work
__________________
yes
Wesley221 is offline  
 

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
Y_INI Loading Files.. Skylar Paul Help Archive 2 25/07/2011 09:15 PM
Y_INI Loading Help randomkid88 Help Archive 3 06/06/2011 04:47 PM
Saving and loading with Y_ini StilThere Help Archive 0 03/06/2011 07:44 PM
Issue with y_ini skin loading OldDirtyBastard Help Archive 3 17/02/2011 04:43 PM
[SOLVED]Strange y_ini skin loading problem OldDirtyBastard Help Archive 0 16/02/2011 07:09 PM


All times are GMT. The time now is 04:27 PM.


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