Pawn can't handle 2 loops?
#9

Could be true what MaVe mentioned. Try altering your code to:

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	for(new i; i < FACTIONS; i++)
	{
	  if(pickupid == gFPickup[i]) //if the pickup is the one from the faction base
	  {
	  	new string[256], fname[128];
	  	format(fname, sizeof(fname), "/factions/%i", i);
	  	string = dini_Get(fname, "name");
	  	format(string, sizeof(string), "%s base", string);
	  	GameTextForPlayer(playerid, string, 2000, 0);
	  	SetPlayerPos(playerid, dini_Float(fname, "intX"), dini_Float(fname, "intY")+5, dini_Float(fname, "intZ"));
	  	SetPlayerInterior(playerid, dini_Int(fname, "intid"));
	  }
	  else continue; //if not, continue the loop
	}

	for(new j; j < FACTIONS; j++)
	{
		if(pickupid == gFIntPickup[j])
		{
		  SendClientMessage(playerid, COLOR_BLUE, "Aren't you outside yet?!");
		  new fname[128];
		  format(fname, sizeof(fname), "/factions/%i", j);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid, dini_Float(fname, "X"), dini_Float(fname, "Y"), dini_Float(fname, "Z"));
		}
		else continue;
	}
  return 1;
}
(( Just "<=" changed to "<" ))

Try that out!
Reply


Messages In This Thread
Pawn can't handle 2 loops? - by goudewup - 31.01.2010, 09:54
Re: Pawn can't handle 2 loops? - by [HiC]TheKiller - 31.01.2010, 09:59
Re: Pawn can't handle 2 loops? - by ray187 - 31.01.2010, 10:16
Re: Pawn can't handle 2 loops? - by goudewup - 31.01.2010, 11:59
Re: Pawn can't handle 2 loops? - by ray187 - 31.01.2010, 12:07
Re: Pawn can't handle 2 loops? - by goudewup - 31.01.2010, 12:18
Re: Pawn can't handle 2 loops? - by Streetplaya - 31.01.2010, 12:20
Re: Pawn can't handle 2 loops? - by goudewup - 31.01.2010, 13:44
Re: Pawn can't handle 2 loops? - by ray187 - 31.01.2010, 14:44

Forum Jump:


Users browsing this thread: 2 Guest(s)