08.03.2015, 17:05
You'd normally have to read those sorts of thing somewhere else an assign them when using something like Y_INI, as the syntax, as said before, is:
In most cases, you'd do a file parse with Y_INI, resulting in something like this for vehicles....
That assigns the ini file's contents to variables, then you can use strcmp to compare those variables safely.
This is, however, assuming that you are using Y_INI.
I couldn't even remotely help you with dini, except from offering the advice of attempting to move to YINI, but it should be somewhat similar, lol.
Код:
INI_String(name[], dest[], size)
Код:
stock vLoad(vehID, file[]) { INI_ParseFile(file,"LoadVehicleData", .bExtra = true, .extra = vehID); CreateOwnedVeh(vData[vehID][vModel],vData[vehID][vPos][0],vData[vehID][vPos][1],vData[vehID][vPos][2],vData[vehID][vPos][3],vData[vehID][vCol1],vData[vehID][vCol2],vData[vehID][vOwner]); } forward LoadVehicleData(vehID, name[], value[]); public LoadVehicleData(vehID, name[], value[]) { INI_Int("Model",vData[vehID][vModel]); for(new i = 0; i < 4; i++) { format(strLoc,sizeof(strLoc),"Pos%d",i); INI_Float(strLoc,vData[vehID][vPos][i]); } INI_Int("Color1",vData[vehID][vCol1]); INI_Int("Color2",vData[vehID][vCol2]); INI_String("Owner",vData[vehID][vOwner],24); INI_Int("Lockstate", vData[vehID][vLocked]); return 1; }
This is, however, assuming that you are using Y_INI.
I couldn't even remotely help you with dini, except from offering the advice of attempting to move to YINI, but it should be somewhat similar, lol.