Another weird y_ini reading problem
#3

The tags are correct, for the last 100 times I, personally, checked.
The enum:
pawn Код:
enum v_info_
{
    id,
    model,
    col1,
    col2,
    Float: x,
    Float: y,
    Float: z,
    Float: a,
    owner[MAX_PLAYER_NAME],
    comps[14],
    panel,
    door,
    light,
    tire
}
The weirder thing is:
printing the values in vehicle_load_data:
pawn Код:
forward vehicle_load_data(v, name[], value[]);
public vehicle_load_data(v, name[], value[])
{
    new strComp[10];
    INI_Int("model", vInfo[v][model]);
    INI_Int("col1", vInfo[v][col1]);
    INI_Int("col2", vInfo[v][col2]);
    INI_Float("x", vInfo[v][x]);
    INI_Float("y", vInfo[v][y]);
    INI_Float("z", vInfo[v][z]);
    INI_Float("angle", vInfo[v][a]);
    INI_String("owner", vInfo[v][owner], MAX_PLAYER_NAME);
    INI_Int("paintjob", vPaintjob[v]);
    INI_Int("panel", vInfo[v][panel]);
    INI_Int("door", vInfo[v][door]);
    INI_Int("light", vInfo[v][light]);
    INI_Int("tire", vInfo[v][tire]);
    printf("%d | %d | %d | %d | %d", v, vInfo[v][panel]  , vInfo[v][door]  , vInfo[v][light], vInfo[v][tire] );
    for(new i = 0; i < 14; i++) {format(strComp, sizeof(strComp), "comp%d", i); INI_Int(strComp, vInfo[v][comps][i]); }
    return 1;
}
Is giving me the CORRECT values that were saved in the file.
However, printing it in LoadVehicle:
pawn Код:
LoadVehicle(v, file[])
{
    INI_ParseFile(file, "vehicle_load_%s", .bExtra = true, .extra = v);
    CreateSystemVehicle(vInfo[v][model], vInfo[v][x], vInfo[v][y], vInfo[v][z], vInfo[v][a], vInfo[v][col1], vInfo[v][col2], vInfo[v][owner]);
    ChangeVehiclePaintjob(vInfo[v][id], vPaintjob[v]);
    printf("%d | %d | %d | %d | %d", v, vInfo[v][panel]  , vInfo[v][door]  , vInfo[v][light], vInfo[v][tire] );
    UpdateVehicleDamageStatus(vInfo[v][id], vInfo[v][panel], vInfo[v][door] ,vInfo[v][light], vInfo[v][tire]);
    for(new i = 0; i < 14; i++) AddVehicleComponent(vInfo[v][id], vInfo[v][comps][i]);
}
Prints out zeros. Again, all other information is correct.
This means that the information is lost somewhere between reading and parsing the file. The data is read from the file correctly and transported to the correct vars, but is lost after parsing the file.
Reply


Messages In This Thread
Another weird y_ini reading problem - by [XST]O_x - 06.08.2013, 19:29
Re: Another weird y_ini reading problem - by [XST]O_x - 06.08.2013, 21:16
Re: Another weird y_ini reading problem - by [XST]O_x - 06.08.2013, 21:25
Re: Another weird y_ini reading problem - by [XST]O_x - 06.08.2013, 21:37
Re: Another weird y_ini reading problem - by [XST]O_x - 06.08.2013, 22:02

Forum Jump:


Users browsing this thread: 3 Guest(s)