Question for strings
#3

Quote:
Originally Posted by RoboN1X
Посмотреть сообщение
Well, in my opinion it's depending on how you will use those string variables, i'd go with option 2. But i'm wondering what kind of string you are trying to save with that a lot numbers and how you use it? Also you don't need IsPlayerConnected() when using foreach() function
Hmm, im using that strings for dialog...

And my logic is option 2, because i think that I don't need to create that strings for ex: 100 times(100 players online), when i can create that just once... Is that true?

Here is that part where im using that strings:
Код:
format(coordstring, sizeof(coordstring),"        {FFFFFF}|___{00FFFF}BANKARSKI IZVESTAJ{FFFFFF}___|");
					format(coordstring1, sizeof(coordstring1),"\n{00FFFF}Plata: {FFFFFF}$%d", checks);
	                format(coordstring2, sizeof(coordstring2),"\n{00FFFF}Steceni interes: {FFFFFF}$%d",interes);
	                format(coordstring3, sizeof(coordstring3),"\n{00FFFF}Kamatna stopa: {FFFFFF}0.%d posto",kamatnastopa);
					format(coordstring4, sizeof(coordstring4),"\n\n        {FFFFFF}|---------------- {00FFFF}Racuni {FFFFFF}----------------|");
					format(coordstring5, sizeof(coordstring5),"\n{00FFFF}Racun za struju: {FFFFFF}$%d",struja);
					format(coordstring6, sizeof(coordstring6),"\n{00FFFF}Racun za vodu: {FFFFFF}$%d",voda);
					format(coordstring7, sizeof(coordstring7),"\n{00FFFF}Racun za komunalije: {FFFFFF}$%d",komunalije);
					format(coordstring8, sizeof(coordstring8),"\n\n        {FFFFFF}|---------------- {00FFFF}Porezi {FFFFFF}----------------|");
					format(coordstring9, sizeof(coordstring9),"\n{00FFFF}Rent: {FFFFFF}%d",rent);
					format(coordstring10, sizeof(coordstring10),"\n{00FFFF}Porez na bogatstvo: {FFFFFF}$%d",porezbogastvo);
					format(coordstring11, sizeof(coordstring11),"\n\n        {FFFFFF}|-----------------------------------------------|");
					format(coordstring12, sizeof(coordstring12),"\n{00FFFF}Staro Stanje: {FFFFFF}$%d{FFFFFF}", PlayerInfo[i][pAccount] - checks - interes + (porezbogastvo + struja + voda + komunalije));
					format(coordstring13, sizeof(coordstring13),"\n{00FFFF}Novo Stanje: {FFFFFF}$%d",PlayerInfo[i][pAccount]);
					format(coordstring15, sizeof(coordstring15),"\n\n        {FFFFFF}|-----------------------------------------------|");
					format(payday, sizeof(payday)," %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,coordstring8,coordstring9,coordstring10,coordstring11,coordstring12,coordstring13,coordstring15);
				    ShowPlayerDialog(i, PLATA, DIALOG_STYLE_MSGBOX, "Bankarski izvestaj gradjana", payday , "U redu", "");
Reply


Messages In This Thread
Question for strings - by DusanInfinity - 21.12.2015, 10:03
Re: Question for strings - by RoboN1X - 21.12.2015, 10:08
Re: Question for strings - by DusanInfinity - 21.12.2015, 10:15
Re: Question for strings - by Vince - 21.12.2015, 10:21
Re: Question for strings - by jamesbond007 - 21.12.2015, 11:41
Re: Question for strings - by Mic_H - 21.12.2015, 13:09
Re: Question for strings - by DusanInfinity - 21.12.2015, 19:13
Re: Question for strings - by AmigaBlizzard - 21.12.2015, 20:31
Re: Question for strings - by SickAttack - 21.12.2015, 21:48
Re: Question for strings - by DusanInfinity - 22.12.2015, 19:23

Forum Jump:


Users browsing this thread: 2 Guest(s)