December 17, 201510 yr I was looking at an aircraft.cfg file and noticed that there are duplicated parameter names (point.5) in the contact_points section. I read through the "FS2004 Aircraft Container SDK" and didn't find a comment which explictly allows for the duplication. What is the expected behvior of the ini parser when a duplicated parameter is incountered. Are duplicates simply ignored? //GEAR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 point.0=1, 8.00, 0.00, -4.55, 2600.0, 0, 0.7, 33.0, 0.22, 2.5, 1.50, 7.0, 9.0, 0, 160, 180 point.1=1, -1.80, -4.65, -4.60, 1900.0, 1, 0.9, 0.0, 0.40, 2.5, 0.85, 9.0, 8.0, 2, 160, 180 point.2=1, -1.80, 4.65, -4.60, 1900.0, 2, 0.9, 0.0, 0.40, 2.5, 0.85, 9.0, 8.0, 3, 160, 180 //SCRAPES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 point.3=2, 1.00, -19.00, 2.00, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0 // L Wtip point.4=2, 1.00, 19.00, 2.00, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0 // R Wtip point.5=2,-16.50, -4.95, 0.15, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0 // Boom L point.5=2,-16.50, 4.95, 0.15, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0 // Boom R point.6=2, 8.50, 0.00, -2.25, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 // Belly Fwd point.7=2, -1.00, 0.00, -2.50, 900.0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 // Belly Aft point.8=5, 0.50, -0.40, 0.00, 1.1, 0, 0, 1.1, 0, 0, 1.0, 0.1, 0.1, 0, 0, 0 // Special use point.9=5, 0.50, 0.40, 0.00, 1.1, 0, 0, 1.1, 0, 0, 1.0, 0.1, 0.1, 0, 0, 0 // Special use Please advise and thanks! Mark
December 17, 201510 yr No idea.. Either everything after point 5 is nulled or only the last point 5 (and onward) is used. Similar to the effect if a duplicate [fltsim.X] is used for a repaint. Advise to just renumber them - point.5 thru point.10 . Remember to verify/change max_number_of_points = XX in the [contact_points] section to suit. FS RTWR SHRS F-111 JoinFS Little Navmap
December 17, 201510 yr Commercial Member This is a simple .ini file despite the .cfg extension. It will read using GetPrivateProfileString, which will return the first one and never, ever see the second one. Everything else will work as expected. Ed Wilson Mindstar AviationMy Playland - I69
December 17, 201510 yr Author No idea.. Either everything after point 5 is nulled or only the last point 5 (and onward) is used. Similar to the effect if a duplicate [fltsim.X] is used for a repaint. Advise to just renumber them - point.5 thru point.10 . Remember to verify/change max_number_of_points = XX in the [contact_points] section to suit. That sounds very reasonable. I've been working on a Sim object model and the VBA Collection object does not like duplication in the key field. It's also funny that this aircraft.cfg was from a payware model, but unfortunately, it's not the only anomaly I've run into! Suppose I've got some editing to do, that is, if I want a clean dataset. Thanks again! Mark
December 18, 201510 yr Author This is a simple .ini file despite the .cfg extension. It will read using GetPrivateProfileString, which will return the first one and never, ever see the second one. Everything else will work as expected. Thanks for the info Ed, I am certain that you would know Interestingly, that's what I'm using with my latest object model as well. That is, all of the "PrivateProfile" functions that I need are are wrapped in an object model which is a fluent interface. The mad seach for the singleton continues... Thanks and best regards, Mark
Create an account or sign in to comment