problem with y-ini
#1

I have a problem with y-ini system
How can I create new file !!!
i want to make new file with y-ini to save my server things , like server run time , capacity of dm zones and etc.
so i need an ini file ! i need it , because ive changed dini to y-ini
i want something like that in dini
Код:
#define Servsts 	       		"/Serversts/Cage.txt"
  	    new Serverstatus[64];
	    format(Serverstatus,sizeof(Serverstatus),Servsts);
	    dini_Create(Serverstatus);
	    dini_IntSet(Serverstatus,"cagea",0);
	    dini_IntSet(Serverstatus,"cageb",0);
	    dini_IntSet(Serverstatus,"cagec",0);
	    dini_IntSet(Serverstatus,"caged",0);
i want to make exactly this in y-ini but i dont know how
i read a lots of posts but i cant do this !!!
should i use parse ? or load ? which one ?
Look, actually this is my new code
Код:
#define ServerPath "Server/Server.txt"
public OnPlayerConnect(playerid)
{
INI_ParseFile(SrvPath(playerid),"(What is this ?!)", .bExtra = true(Whats This ?), .extra = playerid(Whats This ?));
return 1;
}
stock SrvPath()
{
    new srvpd[128]
    format(srvpd,sizeof(srvpd),ServerPath);
    return srvpd;
}
Reply
#2

I read your posts !
please someone tell me how can i create new file ?!!!
i want this line just
Quote:

new Serverstatus[64];
format(Serverstatus,sizeof(Serverstatus),Servsts);
dini_Create(Serverstatus);
Reply
#3

pawn Код:
main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    //INI_Load("YSI/core.EN");
    //printf("%d", !strcmp("", "hi"));
    INI_Load("testing.ini");
    new
        INI:tt = INI_Open("testing.ini");
    /*INI_WriteString(tt, "fa", "aa");
    INI_WriteString(tt, "fb", "aa");
    INI_WriteString(tt, "fc", "aa");
    INI_WriteString(tt, "fd", "aa");*/

    INI_SetTag(tt, "woo");
    INI_WriteString(tt, "fa", "ca1");
    INI_WriteString(tt, "fb", "ca1");
    INI_WriteString(tt, "fc", "ca1");
    INI_WriteString(tt, "fd", "ca1");
    INI_RemoveEntry(tt, "fb");
    INI_Close(tt);
    INI_Load("testing.ini");
}
For Parsing : See the source of this FS https://sampforum.blast.hk/showthread.php?tid=502177
Reply
#4

https://sampforum.blast.hk/showthread.php?pid=1138420#pid1138420 this link >> For ******
iFarbod Thx mate
+Rep both
Reply
#5

i dont know what should i put in that parts ... because there was nothing to tell me what is extra usage !
in this part :
Quote:

INI_ParseFile("mine.INI", "anyini_%s", .bExtra = true, .extra = 0);

I know the first part is file location , the second and third and forth part are those parts I cant understand !
I know that third part is extra details but how can I use extra details ?
and we have two extra parts ! third part and fourth part ...
and the second part I don't know what is its usage !
Actually I found out that it is a function !!! but which function and for what ?
I'm completely confused !!!
Reply
#6

For reading use a public function, or an inline function i think must use (y_inlines)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)