07.01.2016, 19:54
So I was basically following a tutorial to figure out how to make a dynamic vehicle system using y_ini and I came across this;
This is the VehicleCreate function and this is where the error is;
To be more precise, the error is with vLoc, any ideas? I am way too sleepy and I can't figure out what's wrong with this. I am honestly frustrated at the moment lmao
Edit: I should sleep I think, fixed it myself, what a stupid mistake i did, lmao
Код:
error 047: array sizes do not match, or destination array is too small
pawn Код:
stock VehicleCreate(vehicleModel,vehicleFaction,Float:vehicleLoc[4],vehicleColor1, vehicleColor2)
{
new vehicleid = VehicleGetFreeSlot();
VehicleInfo[vehicleid][vModel] = vehicleModel;
VehicleInfo[vehicleid][vFaction] = vehicleFaction;
VehicleInfo[vehicleid][vLoc] = vehicleLoc;
VehicleInfo[vehicleid][vColor1] = vehicleColor1;
VehicleInfo[vehicleid][vColor2] = vehicleColor2;
VehicleInfo[vehicleid][vID] = CreateVehicle(vehicleModel,vehicleLoc[0], vehicleLoc[1], vehicleLoc[2], vehicleLoc[3], vehicleColor1, vehicleColor2,-1);
vCreated[vehicleid] = true;
return vehicleid;
}
pawn Код:
stock VehicleLoad(vehicleID, file[])
{
INI_ParseFile(file, "LoadVehicleData", .bExtra = true, .extra = vehicleID);
VehicleCreate(VehicleInfo[vehicleID][vModel],VehicleInfo[vehicleID][vFaction],VehicleInfo[vehicleID][vLoc],VehicleInfo[vehicleID][vColor1],VehicleInfo[vehicleID][vColor2]);
}
Edit: I should sleep I think, fixed it myself, what a stupid mistake i did, lmao