Accessing element at index 65535 past array upper bound 1999
#1

Hey, when I tried updating my script from 0.3z to 0.3.7 I encountered these errors. Before, it worked without a problem. I've tried using the search but I've still not picked up on the problem, so I apologize in advanced for making another thread.


[debug] from server_log.txt
PHP код:
[19:47:48] [debugRun time error 4"Array index out of bounds"
[19:47:48] [debug]  Accessing element at index 65535 past array upper bound 1999
[19:47:48] [debugAMX backtrace:
[
19:47:48] [debug#0 001e8d90 in public CreateVehicleEx (1, 0, 0, 0, 0, 1, 1, -1) from MLRPv4.3.3d.amx
[19:47:48] [debug#1 000daf80 in public OnCharacterLogin (0, 354) from MLRPv4.3.3d.amx
[19:47:48] [debug#2 0007c540 in public OnDialogResponse (0, 2569, 1, 0, 12324896) from MLRPv4.3.3d.amx 
OnCharacterLogin is a big function so I will leave it out and try to solve that on my own.
Any and all help is appreciated, thank you.


CreateVehicleEx() function
PHP код:
public CreateVehicleEx(modelFloat:XFloat:YFloat:ZFloat:Acolor1color2spawntime)
{
    
// FuncLog("CreateVehicleEx");
    
new car CreateVehicle(modelXYZAcolor1color2spawntime);
    
VehApproved[car] = 1;
    
VehLocked[car] = 0;
    
DeleteList[car] = 0;
    if(
IsLicensePlate(model))
    {
        
SetVehicleNumberPlate(car"MLRP");
    }
     
// RespawnCar(car);
    
PlayerHaul[car][pCapasity] = VehicleCapasity(model);
    
PlayerHaul[car][pLoad] = 0;
    
Gas[car] = 100;
    
VehNeon[car][0] = 0;
    
VehNeon[car][1] = 0;
    if(!
IsACar(model))
    {
        
SetVehicleParamsEx(car1000000);
    }
    else
    {
        
SetVehicleParamsEx(car0000000);
    }
    for(new 
ss<MAX_TRUNK_SLOTSs++)
    {
        
TrunkInfo[car][s][tItemAmount] = 0;
        
TrunkInfo[car][s][tItemID] = 0;
        
TrunkInfo[car][s][tItemType] = 0;
        
format(TrunkInfo[car][s][tItemTitle], 30"Empty");
        
UpdateVehicleTrunk(cars);
    }
    return 
car;

dialogid == 2569
PHP код:
if(dialogid == 2569) { // Character Menu
        
if(!responseKickEx(playerid);
        else {
            new 
charQuery[128];
            
format(charQuerysizeof(charQuery), "SELECT * FROM `accounts` WHERE `Username`='%s' LIMIT 1;"GPN(playerid));
            
mysql_query(charQuery);
            
mysql_store_result();
            
mysql_fetch_row(MySQLData"|");
            
mysql_free_result();
            
split2(MySQLDataMySQLField'|');
            switch(
listitem) {
                case 
0: {
                    if(
strval(MySQLField[13]) > 0OnCharacterLogin(playeridstrval(MySQLField[13]));
                    else { 
                        
ShowPlayerDialog(playerid2570DIALOG_STYLE_INPUT"Character Creation""Please Input a name for your character.\n{FF0000}Example: John_Smith""Create""Cancel");
                        
CreatingChar[playerid] = 1;
                    }
                } case 
1: {
                    if(
strval(MySQLField[14]) > 0OnCharacterLogin(playeridstrval(MySQLField[14]));
                    else { 
                        
ShowPlayerDialog(playerid2570DIALOG_STYLE_INPUT"Character Creation""Please Input a name for your character.\n{FF0000}Example: John_Smith""Create""Cancel");
                        
CreatingChar[playerid] = 2;
                    }
                } case 
2: {
                    if(
strval(MySQLField[15]) > 0OnCharacterLogin(playeridstrval(MySQLField[15]));
                    else { 
                        
ShowPlayerDialog(playerid2570DIALOG_STYLE_INPUT"Character Creation""Please Input a name for your character.\n{FF0000}Example: John_Smith""Create""Cancel");
                        
CreatingChar[playerid] = 3;
                    }
                } case 
3: {
                    if(
strval(MySQLField[16]) > 0OnCharacterLogin(playeridstrval(MySQLField[16]));
                    else { 
                        
ShowPlayerDialog(playerid2570DIALOG_STYLE_INPUT"Character Creation""Please Input a name for your character.\n{FF0000}Example: John_Smith""Create""Cancel");
                        
CreatingChar[playerid] = 4;
                    }
                } case 
4: {
                    if(
strval(MySQLField[17]) > 0OnCharacterLogin(playeridstrval(MySQLField[17]));
                    else { 
                        
ShowPlayerDialog(playerid2570DIALOG_STYLE_INPUT"Character Creation""Please Input a name for your character.\n{FF0000}Example: John_Smith""Create""Cancel");
                        
CreatingChar[playerid] = 5;
                    }
                }
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)