[YINI] Read to variable
#1

Hello guys, i create one code to create new file or read from this:

Код:
public DPLS()
{
	if(fexist("DMRPG/Buildings/DPLS.ini"))
	{
	    new INI:ini = INI_Open("DMRPG/Buildings/DPLS.ini");
            INI_Int("Dinheiro",DPLS_cash);
            INI_Int("Materiais",DPLS_materiais);
	    INI_Close(ini);
	}
	else // se nгo existe irб criar o arquivo
	{
 		new INI:ini = INI_Open("DMRPG/Buildings/DPLS.ini");
	        INI_SetTag(ini, "DPLS VARs");
		INI_WriteInt(ini, "Dinheiro", 1001);
		INI_WriteInt(ini, "Materiais", 1002);
		INI_Close(ini);
	}
	return 1;
}
In the top of GameMode i have 2 variables:
Код:
new DPLS_cash;
new DPLS_materiais;
I want to load the values of "Dinheiro" and "Materiais" into "DPLS_cash" and "DPLS_materiais" respectively.

For now i have these errors:
Код:
\SAMP - SERVER\samp037_svr_R2-1-1_win32\gamemodes\HA-GM.pwn(580) : error 017: undefined symbol "name"
\SAMP - SERVER\samp037_svr_R2-1-1_win32\gamemodes\HA-GM.pwn(580) : error 017: undefined symbol "value"
\SAMP - SERVER\samp037_svr_R2-1-1_win32\gamemodes\HA-GM.pwn(581) : error 017: undefined symbol "name"
\SAMP - SERVER\samp037_svr_R2-1-1_win32\gamemodes\HA-GM.pwn(581) : error 017: undefined symbol "value"
Line 580 and 581 is the RED painted
Reply


Messages In This Thread
[YINI] Read to variable - SOLVED - by Hayden_Almeida - 06.11.2015, 22:51
Re: [YINI] Read to variable - by ThePhenix - 06.11.2015, 23:48
Re: [YINI] Read to variable - by Hayden_Almeida - 07.11.2015, 00:12

Forum Jump:


Users browsing this thread: 1 Guest(s)