help [debug] Run time error 4: "Array index out of bounds"
#7

Quote:
Originally Posted by adammal
Посмотреть сообщение
Change your CloseGate function to this:

PHP код:
forward CloseGate(gateidlinkidFloat:fXFloat:fYFloat:fZFloat:speedFloat:fRotXFloat:fRotYFloat:fRotZ);
public 
CloseGate(gateidlinkidFloat:fXFloat:fYFloat:fZFloat:speedFloat:fRotXFloat:fRotYFloat:fRotZ)
{
    new 
id = -1;
    if (
GateData[gateid][gateExists] && GateData[gateid][gateOpened])
     {
         
MoveDynamicObject(GateData[gateid][gateObject], fXfYfZspeedfRotXfRotYfRotZ);
         if ((
id GetGateByID(linkid)) != -1)
        {
            
MoveDynamicObject(GateData[id][gateObject], GateData[id][gatePos][0], GateData[id][gatePos][1], GateData[id][gatePos][2], speedGateData[id][gatePos][3], GateData[id][gatePos][4], GateData[id][gatePos][5]);
            
GateData[id][gateOpened] = 0;
            return 
1;
        }
    }
    return 
0;


ooohh thank you very much, i am very confused with this problem
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)