Wrong loop result.
#1

Hello, I'm trying to make a dialog command to show which businesses are accepting cargo

So this is my code, there is 2 businesses accepting cargo but it only shows one

Anyone know how to fix this?

Code:
CMD:test1(playerid, params[])
{
  		new count = 0;
  		new string[512];
		for(new i; i < MAX_PLAYERS; i++)
		{
  				if(bInfo[i][bPI] == 1)
  				{
					format(string, sizeof(string), "%s %d %d\n", bInfo[i][bName], bInfo[i][bPW], bInfo[i][bPM]);
					count++;
				}
		}
		Dialog_Show(playerid, KKE, DIALOG_STYLE_LIST, "TEST", string, "TEST", "TEST");
		if(count == 0)
		{
			SendMSG(playerid,"No one accepting product.");
		}
	return 1;
}
Reply


Messages In This Thread
Wrong loop result. - by Rongvaldyr - 12.02.2017, 14:37
Re: Wrong loop result. - by jlalt - 12.02.2017, 14:40
Re: Wrong loop result. - by Rongvaldyr - 12.02.2017, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)