Creation of cars help please
#1

Greetings to all members of the forum!

The problem is that only one vehicle is created in the garage, and 5 cars must spawn.

crashdetect Error:
PHP код:
[13:28:53] [debugRun time error 4"Array index out of bounds" 
[13:28:53] [debug]  Attempted to read/write array element at index 65535 in array of size 2000 
[13:28:53] [debugAMX backtrace
[
13:28:53] [debug#1 003dfea4 in SpawnCarTwo (playerid=0, Float:x=511.43341, Float:y=518.25427, Float:z=1002.35968, Float:range=126.67470) at C:\Users\root\Desktop\gamemode\gamemodes\gm.pwn:46048 
[13:28:53] [debug#2 003abf0c in public OnMySQL_QUERY (idx=33, playerid=0, str[]=@00e21fac "") at C:\Users\root\Desktop\gamemode\gamemodes\gm.pwn:43626 



Error code:
PHP код:
stock SpawnCarTwo(playeridFloat:xFloat:yFloat:zFloat:range

    
garage_car[playerid][1] = CreateVehicle(CarInfo[playerid][carModel][1], xyzrange CarInfo[playerid][carColor_one][1] ,CarInfo[playerid][carColor_two][1], 86400); 
    
SetVehicleParamsEx(garage_car[playerid][1],false,false,false,true,false,false,false); 
    
CarHealth[garage_car[playerid][1]] = float(1000); 
    
createdcar ++; 
    
Fuell[garage_car[playerid][1]] = CarInfo[playerid][carFuel][0]; 
    
LoadTuning(playerid,garage_car[playerid][1],1); 
    
SetPVarInt(playerid,"CarsInGarage",1); 



PHP код:
case 5// house S Class 
                    

                        
SpawnCarOne(playerid511.2867,505.0032,1002.3588,47.6021);
                        
LinkVehicleToInterior(garage_car[playerid][0], 19); 
                        
SetVehicleVirtualWorld(garage_car[playerid][0], house+100); 
                        
//---------------------- 
                        
SpawnCarTwo(playerid511.4334,518.2543,1002.3597,126.6747);
                        
LinkVehicleToInterior(garage_car[playerid][1], 19); // This code is 3 error
                        
SetVehicleVirtualWorld(garage_car[playerid][1], house+100); 
                        
//---------------------- 
                        
SpawnCarThree(playerid504.8487,503.1697,1002.3583,90.2742);
                        
LinkVehicleToInterior(garage_car[playerid][2], 19); 
                        
SetVehicleVirtualWorld(garage_car[playerid][2], house+100); 
                           
//---------------------- 
                        
SpawnCarFour(playerid504.5507,512.3398,1002.3583,91.0430);
                        
LinkVehicleToInterior(garage_car[playerid][3], 19); 
                        
SetVehicleVirtualWorld(garage_car[playerid][3], house+100); 
                        
//---------------------- 
                        
SpawnCarFive(playerid504.7199,521.3282,1002.3588,90.3364);
                        
LinkVehicleToInterior(garage_car[playerid][4], 19); 
                        
SetVehicleVirtualWorld(garage_car[playerid][4], house+100); 
                    } 


In what could be the matter?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)