[HELP][+REP] error 032: array index out of bounds
#1

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;
Reply
#2

Can you show us the whole command / variable?
Reply
#3

Код:
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;
}
Reply
#4

Do you have a enum called PlayerTemp or smthing like that?
Reply
#5

no
Reply
#6

You surly have it, an enum "PlayerTemp"
Reply
#7

i've worked with it in alot of things and it works fine,but this is not.
Reply
#8

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)