[debug] Run time error 4: "Array index out of bounds" problem
#2

your third if statment isn't under your first if statment, so aVar[61] can be -1 in your third if statement, either use brackets or only put one statment under a bracketless if statement

pawn Code:
// your structure
    if(/*code*/) // if#1
    if(/*code*/) // if#2, only valid after if#1
    if(/*code*/) // if#3, works without if#1
// either use this
    if(/*code*/) // if#1
    if(/*code*/) // if#2
    else if(/*code*/) // if#3
// or this
    if(/*code*/) // if#1
    {
        if(/*code*/) // if#2
        if(/*code*/) // if#3
    }
// or this
    if(/*code*/) // if#1
        switch(/*code*/)
        {
            case /*constant*/: // if#2
            case /*constant*/: // if#3
        }
// or this
    if(/*code*/) // if#1
    {
        switch(/*code*/)
        {
            case /*constant*/: // if#2
            case /*constant*/: // if#3
        }
    }
Also what is with these numbers from aVar, why not use an second enum?
Reply


Messages In This Thread
[debug] Run time error 4: "Array index out of bounds" problem - by MaestrulFritz - 30.08.2019, 19:14
Re: [debug] Run time error 4: "Array index out of bounds" problem - by Nero_3D - 31.08.2019, 11:14

Forum Jump:


Users browsing this thread: 1 Guest(s)