OtherTimer error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OtherTimer error (
/showthread.php?tid=525315)
OtherTimer error -
JohnFTW - 11.07.2014
Код:
[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?
Re: OtherTimer error -
Stanford - 11.07.2014
Use
instead it should work according to your code.
Good luck any feedback would be appreciated.
Re: OtherTimer error -
JohnFTW - 11.07.2014
Seems to be ok, I`ll reply if I see something wrong in server_log.
Thanks!