run time error 4 :" Arrray index out of bounds
#7

Quote:
Originally Posted by NaS
Посмотреть сообщение
Код:
TruckerTogetther[playerid] = INVALID_PLAYER_ID;
TruckerTogetther[TruckerTogetther[playerid]] = INVALID_PLAYER_ID;
You set TruckerTogetther to INALID_PLAYER_ID and then use it as index.
That's your index out of bounds error.

Store the first value in a local variable, then reset it for playerid and after that use the local variable to reset the other player's TruckerTogetther index.
I have another error in this section
Код:
new mypoint = -1;
				for (new i=0; i<MAX_POINTS; i++)
				{
					if(strcmp(Points[i][Name], "LOS SANTOS Docks", true) == 0)
					{
						mypoint = i;
					}
				}
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						Misc_Save();
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(200);
					}
			 	}
			}
Error
Код:
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)