SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 12/01/2011, 12:57 AM   #1
blackwave
Gangsta
 
Join Date: Oct 2010
Location: Fortaleza, Brazil
Posts: 967
Reputation: 7
Default Y_INI annoyin' issue

On dini, you can do:
pawn Code:
PlayerInfo[playerid][Cash] = dini_Int(file,"Cash");


But on y_ini, how do I do it?

I tried as correctly:
pawn Code:
INI:playerfile[](name[], value[])
{
   INI_Int("cash",GetPlayerMoney(playerid));
   return 0;
}


Give me error of undefined symbol: playerid. Means there's no "playerid " on the structure. So, how do I add? I really need it..
__________________






My youtube user: Click here
blackwave is offline  
Old 12/01/2011, 01:16 AM   #2
JaTochNietDan
High-roller
 
JaTochNietDan's Avatar
 
Join Date: Apr 2007
Location: Republic of Ireland
Posts: 2,502
Reputation: 363
Default Re: Y_INI annoyin' issue

Your syntax is wrong, that function is the function that stores the information into the variables. Like so:

pawn Code:
INI:playerfile[](playerid, name[], value[])
{
   INI_Int("cash",PlayerInfo[playerid][Cash]);
   return 0;
}
That function goes anywhere in the script.

Then when you want to load the data you would run:

pawn Code:
INI_Load("playerfile.ini", true, playerid);
__________________
Releases:
[Includes]: [jBan] | [jBanLite]
[Plugins]: [FileManager] | [Execute]
[Applications]: [Remote Administrator *NEW] | [Script King] | [RCON GUI]
JaTochNietDan is offline  
Old 12/01/2011, 02:34 PM   #3
blackwave
Gangsta
 
Join Date: Oct 2010
Location: Fortaleza, Brazil
Posts: 967
Reputation: 7
Default Re: Y_INI annoyin' issue

Well jatoch, it keep giving me a annoying and senseless error...
pawn Code:
CMD:reset(playerid,params[])
{
   #pragma unused params
   Msg(playerid, color, ""#red"logged variable "#green" reseted");
   logged[playerid]=0;
   new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name));
   format(playerfile,sizeof(playerfile),PLAYER,name);
   INI_Load(PLAYER, playerid, true);
   return 1;
}
INI:playerfile[](playerid, name[], value[])
{
   INI_String("Name",PlayerInfo[playerid][Name]);
   return 0;
}

Code:
 error 017: undefined symbol "INI_String"
I tested other cases with INI Loading and works, except this one: INI_String. I checked the inc and has this function. Also tried with normal arrays, and did work. Except for:
pawn Code:
PlayerInfo[playerid][Name] // I have defined
__________________






My youtube user: Click here
blackwave is offline  
Old 12/01/2011, 03:26 PM   #4
blackwave
Gangsta
 
Join Date: Oct 2010
Location: Fortaleza, Brazil
Posts: 967
Reputation: 7
Default Re: Y_INI annoyin' issue

Anyone .... -.-
__________________






My youtube user: Click here
blackwave 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 reading help armyoftwo Help Archive 9 03/01/2011 10:50 AM
y_ini problems. Toni Help Archive 4 23/11/2010 02:18 AM
Y_Ini. Zh3r0 Help Archive 1 15/10/2010 09:00 PM


All times are GMT. The time now is 03:07 AM.


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