SA-MP Forums Archive
STUPID ERROR HELP ME!!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: STUPID ERROR HELP ME!!! (/showthread.php?tid=535310)



STUPID ERROR HELP ME!!! - falco3205 - 03.09.2014

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




Re: STUPID ERROR HELP ME!!! - LeroyII - 03.09.2014

Which one is line 715 and 716?


Re: STUPID ERROR HELP ME!!! - falco3205 - 03.09.2014

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]);
}


Re: STUPID ERROR HELP ME!!! - Rifa4life - 03.09.2014

Show us the VehicleCreate function.


Re: STUPID ERROR HELP ME!!! - HazardouS - 04.09.2014

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.


Re: STUPID ERROR HELP ME!!! - TheNerka - 04.09.2014

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


Re: STUPID ERROR HELP ME!!! - falco3205 - 04.09.2014

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




Re: STUPID ERROR HELP ME!!! - Skin123 - 04.09.2014

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)


Re: STUPID ERROR HELP ME!!! - falco3205 - 04.09.2014

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