OtherTimer error
#1

Код:
[12:53:14] [debug] Run time error 4: "Array index out of bounds"
[12:53:14] [debug]  Accessing element at index 255 past array upper bound 250
[12:53:14] [debug] AMX backtrace:
[12:53:14] [debug] #0 00062324 in public OtherTimer () at #################.pwn:8775
Line #8775 is
Код:
		    if(CellTime[i] > 0)
			{
				if (CellTime[i] == cchargetime)
				{
					CellTime[i] = 1;
					if(Mobile[Mobile[i]] == i)
					{
						CallCost[i] = CallCost[i]+SBizzInfo[2][sbEntranceCost]/2;
					}
				}
				CellTime[i] = CellTime[i] +1;
				if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
				{
				    if(IsPlayerConnected(Mobile[i]))
				    {
						new called[MAX_PLAYER_NAME];
						new string0[100];
						GetPlayerName(Mobile[i], called, sizeof(called));
						format(string0, sizeof(string0), "* Telefonul lui %s suna.", called);
						RingTone[Mobile[i]] = 10;
						ProxDetector(30.0, Mobile[i], string0, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					}
				}
			}
How can I solve that?
Reply
#2

Use
pawn Код:
Mobile[i]
instead it should work according to your code.

Good luck any feedback would be appreciated.
Reply
#3

Seems to be ok, I`ll reply if I see something wrong in server_log.
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)