How to use Y_Ini Reading in a Loop
#1

Hi,

I'm having touble with using y_Ini reading. There is not much problem with writing but when I use loop in reading callback, it loops whole callback, not just 'for' bracket.

Here is an example;

Код:
INI:myini[](name[], value[])
{
	for(new i; i<MAX_VEHICLES; i++)
	{
		new example[10][15];
		format(example[9], 15, "ExData%da", i);
		format(example[0], 15, "ExData%db", i);
		format(example[1], 15, "ExData%dc", i);
		format(example[2], 15, "ExData%dd", i);
		format(example[3], 15, "ExData%de", i);
		format(example[4], 15, "ExData%df", i);
		format(example[5], 15, "ExData%dg", i);
		format(example[6], 15, "ExData%dh", i);
		format(example[7], 15, "ExData%dj", i);
		format(example[8], 15, "ExData%dk", i);
		new chck;
		INI_Int(example[9], chck);
		if(chck == 1)
		{
			new ex2[5], Float:ex2F[4];
			INI_Int(example[0], ex2[0]);
			INI_Int(example[8], ex2[1]);
			INI_Float(example[2], ex2F[0]);
			INI_Float(example[3], ex2F[1]);
			INI_Float(example[4], ex2F[2]);
			INI_Float(example[5], ex2F[3]);
			INI_Int(example[6], ex2[2]);
			INI_Int(example[7], ex2[3]);
			INI_Int(example[1], ex2[4]);

			ExampleFunction(i, ex2[0], ex2[1], ex2F[0], ex2F[1], ex2F[2], ex2F[3], ex2[2], ex2[3]);


	 	}
	}
	print("\nSucceed!");
	return 0;
}

When i use that code, it loops 'print' too. How can i use loop in y_ini reading?
Reply
#2

Doesn't anyone knows it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)