[HELP][+REP] error 032: array index out of bounds - 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: [HELP][+REP] error 032: array index out of bounds (
/showthread.php?tid=559071)
[HELP][+REP] error 032: array index out of bounds -
McOwens - 20.01.2015
please help i got 3 error of those [+REP] ( for the one who help me )
Код:
(11077) : error 032: array index out of bounds (variable "PlayerTemp")
(32494) : error 032: array index out of bounds (variable "PlayerTemp")
(32496) : error 032: array index out of bounds (variable "PlayerTemp")
================================================== ==============
Код:
(11077) PlayerTemp[playerid][afrozen] = 0;
(32494) PlayerTemp[playerid][afrozen] = 1;
(32496) PlayerTemp[playerid][afrozen] = 0;
Re: [HELP][+REP] error 032: array index out of bounds -
DavidSparks - 20.01.2015
Can you show us the whole command / variable?
Re: [HELP][+REP] error 032: array index out of bounds -
McOwens - 20.01.2015
Код:
forward TogglePlayerControllableEx(playerid,controllable);
public TogglePlayerControllableEx(playerid,controllable)
{
TogglePlayerControllable(playerid,controllable);
if (controllable == 0)
PlayerTemp[playerid][afrozen] = 1;
else if (controllable == 1)
PlayerTemp[playerid][afrozen] = 0;
return 1;
}
Re: [HELP][+REP] error 032: array index out of bounds -
DavidSparks - 20.01.2015
Do you have a enum called PlayerTemp or smthing like that?
Re: [HELP][+REP] error 032: array index out of bounds -
McOwens - 20.01.2015
no
Re: [HELP][+REP] error 032: array index out of bounds -
xVIP3Rx - 20.01.2015
You surly have it, an enum "PlayerTemp"
Re: [HELP][+REP] error 032: array index out of bounds -
McOwens - 20.01.2015
i've worked with it in alot of things and it works fine,but this is not.
AW: Re: [HELP][+REP] error 032: array index out of bounds -
Saize - 21.01.2015
Quote:
Originally Posted by McOwens
Код:
forward TogglePlayerControllableEx(playerid,controllable);
public TogglePlayerControllableEx(playerid,controllable)
{
TogglePlayerControllable(playerid,controllable);
if (controllable == 0) return PlayerTemp[playerid][afrozen] = 1;
else (controllable == 1) return PlayerTemp[playerid][afrozen] = 0;
return 1;
}
|
Try it like this Maybe
I think theirs no need to use else if, but if its not working with else then just write the if by yourself
If it keeps giving you the warnings, then could you send us the line where you define that var? (or the whole enum)