31.10.2015, 08:31
Hi,
im new to pawn and working on a new tuning system. I try this to get the saved stuff from the .ini's:
but it says me for every of this lines "must be assigned to an array", i dont understand it why cant it put the things into the enum?
Here is the enum if needed:
I hope you can help me
Thanks
im new to pawn and working on a new tuning system. I try this to get the saved stuff from the .ini's:
PHP код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
new str[30];
format(str, sizeof(str), "/tunedVehicles/%d.car", i);
if(dini_Exists(str))
{
tuningParts[i][tuning_0] = dini_Get(str, "tuning_0");
tuningParts[i][tuning_0_X] = dini_Get(str, "tuning_0_X");
tuningParts[i][tuning_0_Y] = dini_Get(str, "tuning_0_Y");
tuningParts[i][tuning_0_Z] = dini_Get(str, "tuning_0_Z");
tuningParts[i][tuning_0_RX] = dini_Get(str, "tuning_0_RX");
tuningParts[i][tuning_0_RY] = dini_Get(str, "tuning_0_RY");
tuningParts[i][tuning_0_RZ] = dini_Get(str, "tuning_0_RZ");
tuningParts[i][tuning_1] = dini_Get(str, "tuning_1");
tuningParts[i][tuning_1_X] = dini_Get(str, "tuning_1_X");
tuningParts[i][tuning_1_Y] = dini_Get(str, "tuning_1_Y");
tuningParts[i][tuning_1_Z] = dini_Get(str, "tuning_1_Z");
tuningParts[i][tuning_1_RX] = dini_Get(str, "tuning_1_RX");
tuningParts[i][tuning_1_RY] = dini_Get(str, "tuning_1_RY");
tuningParts[i][tuning_1_RZ] = dini_Get(str, "tuning_1_RZ");
tuningParts[i][tuning_2] = dini_Get(str, "tuning_2");
tuningParts[i][tuning_2_X] = dini_Get(str, "tuning_2_X");
tuningParts[i][tuning_2_Y] = dini_Get(str, "tuning_2_Y");
tuningParts[i][tuning_2_Z] = dini_Get(str, "tuning_2_Z");
tuningParts[i][tuning_2_RX] = dini_Get(str, "tuning_2_RX");
tuningParts[i][tuning_2_RY] = dini_Get(str, "tuning_2_RY");
tuningParts[i][tuning_2_RZ] = dini_Get(str, "tuning_2_RZ");
tuningParts[i][tuning_3] = dini_Get(str, "tuning_3");
tuningParts[i][tuning_3_X] = dini_Get(str, "tuning_3_X");
tuningParts[i][tuning_3_Y] = dini_Get(str, "tuning_3_Y");
tuningParts[i][tuning_3_Z] = dini_Get(str, "tuning_3_Z");
tuningParts[i][tuning_3_RX] = dini_Get(str, "tuning_3_RX");
tuningParts[i][tuning_3_RY] = dini_Get(str, "tuning_3_RY");
tuningParts[i][tuning_3_RZ] = dini_Get(str, "tuning_3_RZ");
tuningParts[i][tuning_4] = dini_Get(str, "tuning_4");
tuningParts[i][tuning_4_X] = dini_Get(str, "tuning_4_X");
tuningParts[i][tuning_4_Y] = dini_Get(str, "tuning_4_Y");
tuningParts[i][tuning_4_Z] = dini_Get(str, "tuning_4_Z");
tuningParts[i][tuning_4_RX] = dini_Get(str, "tuning_4_RX");
tuningParts[i][tuning_4_RY] = dini_Get(str, "tuning_4_RY");
tuningParts[i][tuning_4_RZ] = dini_Get(str, "tuning_4_RZ");
}
}
print("Tuning-vehicles succesfully loaded");
Here is the enum if needed:
PHP код:
enum tuning
{
tuning_0,
tuning_0_X,
tuning_0_Y,
tuning_0_Z,
tuning_0_RX,
tuning_0_RY,
tuning_0_RZ,
tuning_1,
tuning_1_X,
tuning_1_Y,
tuning_1_Z,
tuning_1_RX,
tuning_1_RY,
tuning_1_RZ,
tuning_2,
tuning_2_X,
tuning_2_Y,
tuning_2_Z,
tuning_2_RX,
tuning_2_RY,
tuning_2_RZ,
tuning_3,
tuning_3_X,
tuning_3_Y,
tuning_3_Z,
tuning_3_RX,
tuning_3_RY,
tuning_3_RZ,
tuning_4,
tuning_4_X,
tuning_4_Y,
tuning_4_Z,
tuning_4_RX,
tuning_4_RY,
tuning_4_RZ,
}
new tuningParts[MAX_VEHICLES][tuning];
Thanks