STUPID ERROR HELP ME!!!
#1

Hi this is my problem!! Please help me!!
PHP код:
stock VehicleLoad(vehicleIDfile[])
{
    
INI_ParseFile(file"LoadVehicleData", .bExtra true, .extra vehicleID);
    
VehicleCreate(VehicleInfo[vehicleID][vModel],
    
VehicleInfo[vehicleID][vLoc], VehicleInfo[vehicleID][vColor1], VehicleInfo[vehicleID][vColor2],
    
VehicleInfo[vehicleID][vOwner], VehicleInfo[vehicleID][vLocked]);

Error
PHP код:
C:\Users\PC\Desktop\SAMP\gamemodes\ir.pwn(715 -- 716) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
1 Error

Reply
#2

Which one is line 715 and 716?
Reply
#3

stock VehicleLoad(vehicleID, file[])
{
INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = vehicleID);
715 VehicleCreate(VehicleInfo[vehicleID][vModel],
716 VehicleInfo[vehicleID][vLoc], VehicleInfo[vehicleID][vColor1], VehicleInfo[vehicleID][vColor2],
717 VehicleInfo[vehicleID][vOwner], VehicleInfo[vehicleID][vLocked]);
}
Reply
#4

Show us the VehicleCreate function.
Reply
#5

Actually that function won't help us. Provide the declaration of the VehicleInfo array, because my guess is that "vehicleID" is higher than the upper limit.
Reply
#6

try CreateVehicle(VehicleInfo[vehicleID][vModel], VehicleInfo[vehicleID][vLoc], VehicleInfo[vehicleID][vColor1], VehicleInfo[vehicleID][vColor2], VehicleInfo[vehicleID][vOwner], VehicleInfo[vehicleID][vLocked]);
Reply
#7

This error is my block!!!
PHP код:
stock VehicleCreate(vehicleModelFloat:vehicleLoc[4], vehicleColor1vehicleColor2vehicleRespawnvehicleOwner[], bool:vehicleLocked)

{
    new 
vehicleid VehicleGetFreeSlot();

    
VehicleInfo[vehicleid][vModel] = vehicleModel;
    
VehicleInfo[vehicleid][vLoc] = vehicleLoc
    
VehicleInfo[vehicleid][vColor1] = vehicleColor1;
    
VehicleInfo[vehicleid][vColor2] = vehicleColor2
    
VehicleInfo[vehicleid][vRespawn] = vehicleRespawn
    
format(VehicleInfo[vehicleid][vOwner], MAX_PLAYER_NAMEvehicleOwner); 
    
VehicleInfo[vehicleid][vLocked] = vehicleLocked
    
VehicleInfo[vehicleid][vID] = CreateVehicle(vehicleModelvehicleLoc[0], vehicleLoc[1], vehicleLoc[2], vehicleLoc[3], vehicleColor1vehicleColor2,
    
vehicleRespawn); 

    
vCreated[vehicleid] = true
    
VehicleLock(vehicleidVehicleInfo[vehicleid][vLocked]);

    return 
vehicleid

Reply
#8

You're using Float masssive with int. If you need Float var, create enumerator.
stock VehicleCreate(vehicleModel, Float:vehicleLoc[4], vehicleColor1, vehicleColor2, vehicleRespawn, vehicleOwner[], bool:vehicleLocked)
Reply
#9

I do not understand what is the error that is blocking me compile the gamemode
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)