Getting a "text" from file.
#7

This is the correct code:

Код:
dcmd_loncakur(playerid,params[]) {
	new file[256],string[256];
	ServerInfo[ClanID]++;
	if (udb_CreateClan(ServerInfo[ClanID]))
	{
		format(file,sizeof(file),"klanlar/%d.sav",ServerInfo[ClanID]);
		dini_Set(file,"LoncaAdi",params);
		dini_IntSet(file,"ToplamOyuncu",1);
		dini_IntSet(file,"Kaybeden",0);
		dini_IntSet(file,"Kazanan",0);
	}
	format(string,256,"Tebrikler, %s loncasi kuruldu ! /loncayal komutu ile oyunculara davet gцnderebilirsiniz",params); // Cong. Messagea
	ClanInfo[clanadi] = dini_Get(file,"LoncaAdi");// It doesnt work 
	return 1;
}
What you did was assigning ClanInfo[clanadi] to dini_Get(file,"LoncaAdi") instead of assigning the return value of dini_Get to ClanInfo[clanadi].

Why do you format string btw in the end when you don`t use it afterwards somehow?
Reply


Messages In This Thread
Getting a "text" from file. - by xCoder - 30.01.2010, 07:57
Re: Getting a "text" from file. - by xCoder - 30.01.2010, 09:41
Re: Getting a "text" from file. - by ray187 - 30.01.2010, 10:49
Re: Getting a "text" from file. - by xCoder - 30.01.2010, 13:55
Re: Getting a "text" from file. - by MadeMan - 30.01.2010, 13:56
Re: Getting a "text" from file. - by xCoder - 30.01.2010, 14:11
Re: Getting a "text" from file. - by ray187 - 30.01.2010, 14:26
Re: Getting a "text" from file. - by xCoder - 30.01.2010, 20:44
Re: Getting a "text" from file. - by ray187 - 30.01.2010, 21:50
Re: Getting a "text" from file. - by Norn - 30.01.2010, 22:14

Forum Jump:


Users browsing this thread: 1 Guest(s)