Jump to content
Sign in to follow this  
Mattaus

Error "bin\config.bin\cfgmodels\default.sections"

Recommended Posts

Hello, I don't know where to begin, Let's face it, I'm good at oxygen but horrible at using the config. I have successfully put the 2 models in my config and have used them in the editor, although once I click preview i receive - Error "bin\config.bin\cfgmodels\default.sections"

Then I get led back to the editor which makes me have to press preview the 2nd time so I can use the editor. My objects have successfully loaded and they seem fine in game, it's just this error message seems to be making people angry on the server.

This is how I have my setup before packing the PBO with PBOview.

P:\du_RTA - I have the $PREFIX$, config.bin and the 2 models, which are .p3d.

then I have P:\du_RTA\posters\ with all the .paa (textures).

I'm not using a .cpp, As i'd probably prefer to use a .bin as it seems much cleaner to use. The 2 models I have created are just a roadsign and a speedcamera which are just static objects. This is what I have in the .bin.

unledlrn.png

Any help would be much appreciated.

***ADDED***

I have also tried binarizing it with binPBO but once I do that the file size comes from 2.8mb to 800kb and then it won't show the vehicle class ingame.

Share this post


Link to post
Share on other sites
I'm not using a .cpp, As i'd probably prefer to use a .bin as it seems much cleaner to use

Well, maybe for you, but if you check the forums everyone posts their configs as text files from the .cpp source.

If youre using BinPBO then theres definely no reason to try using a .bin file.

And unfortuately that ...... picture ..... doesn't tell us much and could mask a 100 issues.

Post you config as a text file using the PHP tags.

If you used BinPBO, what did the log file say was the problems?

Share this post


Link to post
Share on other sites
Gnat;1973120']Well' date=' maybe for you, but if you check the forums Post you config as a text file using the PHP tags. If you used BinPBO, what did the log file say was the problems?[/quote']

Log file had detected no problems, it was clean.

Heres

 raP       „    CfgPatches N    CfgVehicleClasses ’    cfgVehicles Ã…   Ž     DU_RTA `   Ž    units  weapons  requiredVersion   €?Ž   à     DU_RTA ¤   à     displayName DU - RTA à   „   FlagCarrier  du_roadsign_speed     du_speedcam m  i  FlagCarrier scope     icon \ca\data\data\Unknown_object.paa mapSize 333?accuracy ÃÃŒL> destrType DestructNo hiddenSelections  Poster  displayName Speed Camera Sign reversed     hasDriver      nameSound obj_object accuracy 
×£; simulation house cost è   picture pictureStaticObject weapons  magazines  irTarget     type    threat             maxSpeed     coefInside    coefInsideHeur    hiddenSelectionsTextures  \du_RTA\posters\speedcam.paa  \du_RTA\posters\pole_texture.paa  \du_RTA\posters\steel_back.paa  model \du_RTA\du_roadsign_speed.p3d  vehicleClass DU_RTA i  „  FlagCarrier scope     icon \ca\data\data\Unknown_object.paa mapSize 333?accuracy ÃÃŒL> destrType DestructNo hiddenSelections  Poster reversed     hasDriver      nameSound obj_object accuracy 
×£; simulation house cost è   picture pictureStaticObject weapons  magazines  irTarget     type    threat             maxSpeed     coefInside    coefInsideHeur     displayName Speed Camera hiddenSelectionsTextures  \du_RTA\posters\tew.paa  model \du_RTA\du_speedcam.p3d  vehicleClass DU_RTA „ 

Some parts of that still seem to be binarized, I use Laza to read it as a config.bin then I saved it as a .cpp and copied the text above.

Gnat;1973120']

If youre using BinPBO then theres definely no reason to try using a .bin file.

No I use PboView0.8 to pack it as a pbo. I thought I'd just try BinPBO to see if that would make a difference if I biniarize it but I guess not.

So your saying the bin file is already binarized so I don't need to tick the option in BinPBO?

Hope that helps.

Edited by Mattaus

Share this post


Link to post
Share on other sites
So your saying the bin file is already binarized so I don't need to tick the option in BinPBO?

I'm saying if you used a text format .cpp file

1) I'd be able to read it (no, I can't read it in your latest post)

2) Using BinPBO would properly turn the .cpp file into a .bin (inside your PBO)

And you dont need a "$PREFIX$", BinPBO makes it for you.

Use the unRap tool from here to turn ANY .bin file into a readable .cpp file.

http://www.armaholic.com/page.php?id=5845

(Select "No" to "Generate Separate files" when running unRap)

Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

Ok mate, I really appreciate you helping me, here it is, looking more like it.

// config.bin - 00:25:28 07/05/11, generated in 0.01 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled

#define private		0
#define protected		1
#define public		2

#define true	1
#define false	0

#define VSoft		0
#define VArmor		1
#define VAir		2

enum {
  = 0,
};

class CfgPatches {
class DU_RTA {
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.0;
};
};

class CfgVehicleClasses {
class DU_RTA {
	displayName = "DU - RTA";
};
};

class cfgVehicles {
class FlagCarrier;	// External class reference

class du_roadsign_speed : FlagCarrier {
	scope = public;
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	destrType = "DestructNo";
	hiddenSelections[] = {"Poster"};
	displayName = "Speed Camera Sign";
	reversed = false;
	hasDriver = false;
	nameSound = "obj_object";
	accuracy = 0.005;	// accuracy needed to recognize type of this target
	simulation = "house";
	cost = 1000;
	picture = "pictureStaticObject";
	weapons[] = {};
	magazines[] = {};
	irTarget = false;
	type = VArmor;

	// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
	threat[] = {0.0, 0.0, 0.0};

	maxSpeed = 0;	// max speed on level road, km/h
	coefInside = 4;
	coefInsideHeur = 4;
	hiddenSelectionsTextures[] = {"\du_RTA\posters\speedcam.paa", "\du_RTA\posters\pole_texture.paa", "\du_RTA\posters\steel_back.paa"};
	model = "\du_RTA\du_roadsign_speed.p3d";
	vehicleClass = DU_RTA;
};

class du_speedcam : FlagCarrier {
	scope = public;
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	destrType = "DestructNo";
	hiddenSelections[] = {"Poster"};
	reversed = false;
	hasDriver = false;
	nameSound = "obj_object";
	accuracy = 0.005;	// accuracy needed to recognize type of this target
	simulation = "house";
	cost = 1000;
	picture = "pictureStaticObject";
	weapons[] = {};
	magazines[] = {};
	irTarget = false;
	type = VArmor;

	// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
	threat[] = {0.0, 0.0, 0.0};

	maxSpeed = 0;	// max speed on level road, km/h
	coefInside = 4;
	coefInsideHeur = 4;
	displayName = "Speed Camera";
	hiddenSelectionsTextures[] = {"\du_RTA\posters\tew.paa"};
	model = "\du_RTA\du_speedcam.p3d";
	vehicleClass = DU_RTA;
};
};

Your probably thinking, wtf is Mattaust thinking for using half of these parameters when they probably don't relate to the object at all.

Edited by Mattaus

Share this post


Link to post
Share on other sites

Ok Gnat, I deleted that bin and the PREFIX, now I have the .cpp in place.

BinPBO is now coming up with errors in the logfile when binarizing it and packing it to a PBO.

File p:\du_rta\config.cpp, line 32: /cfgVehicles/du_roadsign_speed.accuracy: Member already defined.
File p:\du_rta\config.cpp, line 62: /cfgVehicles/du_speedcam.accuracy: Member already defined.
Error in config p:\du_rta\config.cpp
File p:\du_rta\config.cpp, line 32: /cfgVehicles/du_roadsign_speed.accuracy: Member already defined.
File p:\du_rta\config.cpp, line 62: /cfgVehicles/du_speedcam.accuracy: Member already defined.
Error in config p:\du_rta\config.cpp

It now seems I'm getting down to the problem, your Help or anyone elses would be great.

Cheers, Matt.

Edited by Mattaus

Share this post


Link to post
Share on other sites

Yes, duplicate definitions. Delete one.

Also, for a sign there appears to be too many parameters being defined.

You are already inheriting all the normal paramters via FLAGCARRIER so you only need to define your custom ones.

Maybe this is all you need (just one class as an example)

   class du_roadsign_speed : FlagCarrier {
       scope = public;
       icon = "\ca\data\data\Unknown_object.paa";
       mapSize = 0.7;
       accuracy = 0.2;    // maybe not needed
       hiddenSelections[] = {"Poster"};
       displayName = "Speed Camera Sign";
       hiddenSelectionsTextures[] = {"\du_RTA\posters\speedcam.paa", "\du_RTA\posters\pole_texture.paa", "\du_RTA\posters\steel_back.paa"};
       model = "\du_RTA\du_roadsign_speed.p3d";
       vehicleClass = DU_RTA;
   };

Share this post


Link to post
Share on other sites

Edit, hold up, had so much clutter, that things are not adding up. Will post back when things are more clear.

Edited by Mattaus

Share this post


Link to post
Share on other sites
Gnat;1973826']Yes' date=' duplicate definitions. Delete one.

Maybe this is all you need (just one class as an example)

[/php']

How would I go on adding 2 models, do they need separate classes?

Share this post


Link to post
Share on other sites

Yes, two classes.

You have two classes, they just need a tidy.

If they are virtually the same, the second you can inherit from the first;

Maybe like this;

   class du_roadsign_speed : FlagCarrier { 
       scope = public; 
       icon = "\ca\data\data\Unknown_object.paa"; 
       mapSize = 0.7; 
       accuracy = 0.2;    // maybe not needed 
       hiddenSelections[] = {"Poster"}; 
       displayName = "Speed Camera Sign"; 
       hiddenSelectionsTextures[] = {"\du_RTA\posters\speedcam.paa", "\du_RTA\posters\pole_texture.paa", "\du_RTA\posters\steel_back.paa"}; 
       model = "\du_RTA\du_roadsign_speed.p3d"; 
       vehicleClass = DU_RTA; 
   };  
   class du_speedcam : du_roadsign_speed { 
       displayName = "Speed Camera"; 
       model = "\du_RTA\du_speedcam.p3d";
	hiddenSelectionsTextures[] = {"\du_RTA\posters\tew.paa"};
   }; 

Share this post


Link to post
Share on other sites

I hope you realise that this error ( Error "bin\config.bin\cfgmodels\default.sections" ) is not caused by your config.cpp, but by the model.cfg that should live alongside your p3ds...

Share this post


Link to post
Share on other sites
I hope you realise that this error ( Error "bin\config.bin\cfgmodels\default.sections" ) is not caused by your config.cpp, but by the model.cfg that should live alongside your p3ds...

Hmm that's strange, I don't have any model.cfg's? And whenever I de/unpbo something, I NEVER see a model.cfg? The error no longer comes up for me for 1 model but as soon As I tried gnat's quote for adding the 2nd, this appears in the log now:

File p:\du_rta\config.cpp, line 30: /cfgVehicles/: Missing '}'
Error 3 while parsing
Error in config p:\du_rta\config.cpp
W:\c\Poseidon\El\ParamFile\paramFile.cpp(753) : Class destroyed, but still locked
File p:\du_rta\config.cpp, line 30: /cfgVehicles/: Missing '}'
Error 3 while parsing
Error in config p:\du_rta\config.cpp
W:\c\Poseidon\El\ParamFile\paramFile.cpp(753) : Class destroyed, but still locked

This is the new .cpp file:

#define private		0
#define protected	1
#define public		2

enum {
 //  = 0,	// Error parsing: Empty enum name
};

class CfgPatches {
class DU_RTA {
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.0;
};
};

class cfgVehicles {
class FlagCarrier;	// External class reference

class du_roadsign_speed : FlagCarrier {
	scope = public;
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	hiddenSelections[] = {"Poster"};
	displayName = "Speed Camera Sign";
	hiddenSelectionsTextures[] = {"\DU_RTA\posters\speedcam.paa", "\DU_RTA\posters\pole_texture.paa", "\DU_RTA\posters\steel_back.paa"};
	model = "\DU_RTA\du_roadsign_speed.p3d";
	vehicleClass = DU_RTA;
 };   
   class du_speedcam : du_roadsign_speed {  
       displayName = "Speed Camera";  
       model = "\DU_RTA\du_speedcam.p3d"; 
       hiddenSelectionsTextures[] = {"\DU_RTA\posters\tew.paa"}; 
};

Share this post


Link to post
Share on other sites

With every { there must be an end };

So

class cfgVehicles {

must be ended with a

};

at the very end of the config.

Share this post


Link to post
Share on other sites
whenever I de/unpbo something, I NEVER see a model.cfg?

You wont, because its embedded into the p3d during binarization.

Its odd that the error pops when you dont even have one tho.

Try saving the following as model.cfg next to your p3ds (so in P:\du_RTA)

class CfgModels
{
class Default;
class du_roadsign_speed : Default
{
	sectionsInherit = "Default";
	sections[]      = {"poster"};
};
class du_speedcam : Default {};
};

Also, I hate your formatting, its so much easier to read when its formatted like the above ;)

Note that the way your model is setup, the hidden selections (and therefore hidden selection textures) will not work, as there is no model.cfg defining the sections (which is what is causing your error ingame which can have textures swapped on them.

Note also that you only have one hidden selection "poster" but are trying to change 3 textures ("speedcam", "pole_texture" and "steel_back")

I'm not sure what you're trying to achieve with this as you're only making one sign, so it would be easier to just plain ignore hidden selections completely?

Share this post


Link to post
Share on other sites

I'm not sure what you're trying to achieve with this as you're only making one sign, so it would be easier to just plain ignore hidden selections completely?

Omg, I feel like a bit of a d***head. Or should I say i fully feel like one.

Let's clear this up, I'm a f'''ing terrible scripter, and always will be. I had no idea what hidden selection textures were in the first place.

Let me just do what I need to fix and I'll report back.

---------- Post added at 10:30 PM ---------- Previous post was at 10:26 PM ----------

Ok, I'm getting 2 errors, which I reckon could be fixed easily but am unsure.

When editing and click on Empty, this comes up: (The Class is blank in the editor)

No entry 'bin\config.bin/CfgVehicleClasses.DU_RTA'.

And when I choose the du_roadsign_speed.p3d model in the editor this appears.

Error loading du_rta\du_roadsign_speed.p3d (Magic)

Share this post


Link to post
Share on other sites

You have lost your class definition from the config. You had it before.

class CfgVehicleClasses {
   class DU_RTA {
       displayName = "DU - RTA";
   };
};

On the model.cfg;

Is;

du_roadsign_speed.p3d

the exact name of your 3d file in your folder.

It has to be because the class must = filename.

Or, is the p3d file already binarised or something?

Share this post


Link to post
Share on other sites
Gnat;1974771']You have lost your class definition from the config. You had it before.

class CfgVehicleClasses {
   class DU_RTA {
       displayName = "DU - RTA";
   };
};

On the model.cfg;

Is;

du_roadsign_speed.p3d

the exact name of your 3d file in your folder.

It has to be because the class must = filename.

Or' date=' is the p3d file already binarised or something?[/quote']

Clumsy of me for the first part.. That just goes to show how Stupid I am.

I checked before and the p3d is binarised BUT i looked at both and they were both binarised.. Sooo how does that work out? Ill get 2 fresh copies of the p3d tho and test it.

---------- Post added at 11:05 PM ---------- Previous post was at 10:52 PM ----------

Ok I got fresh copies just to be sure and it's still coming up for the 2nd error, (The first error is now gone.. Thanks)

I'm 99% sure it's correct. Here's a pic to clarify.

27121353.jpg

---------- Post added at 11:52 PM ---------- Previous post was at 11:05 PM ----------

THANKS GNAT!! It works perfectly now and is error free!!! I realised the problem was not in the cpp itself but was in the actual model where the very first lod was set to 100 not 0.. hehe. All good now.

Thank you DM for fixing up that model error too.

Share this post


Link to post
Share on other sites

deleted

Good stuff ...... see, youre not dumb after all, you now know a LOT more.

Share this post


Link to post
Share on other sites

Actually Gnat, a big problem!

I thought I'd create another .pbo with the same config [but edited for the 2 other objects] and it's coming up with this error for both models (Models worked in game before this config but same error as before at beginning)

Cannot open object du_objects\du_atm.p3d

Cannot open object du_objects\du_safe.p3d

Comes up only when i select the individual model in the editor and hit preview.

Heres the config for du_objects below: (Same as the RTA one but edited for these objects)

#define private		0
#define protected	1
#define public		2

enum {
 //  = 0,	// Error parsing: Empty enum name
};

class CfgPatches {
class DU_OBJECTS {
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.0;
};
};

class CfgVehicleClasses { 
   class DU_OBJECTS { 
       displayName = "DU - Objects"; 
   }; 
};  

class cfgVehicles {
class FlagCarrier;	// External class reference

class du_atm : FlagCarrier {
	scope = public;
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	displayName = "DU - ATM";
	model = "\DU_OBJECTS\du_atm.p3d";
	vehicleClass = DU_OBJECTS;
 };   

   class du_safe : FlagCarrier {
       scope = public;	
	icon = "\ca\data\data\Unknown_object.paa";
       mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	displayName = "DU - SAFE";  
       model = "\DU_OBJECTS\du_safe.p3d";
       vehicleClass = DU_OBJECTS;		
};
};

THIS IS THE DU_RTA ONE BELOW as I made a few adjustments: (Works fine ingame - no errors.)

#define private		0
#define protected	1
#define public		2

enum {
 //  = 0,	// Error parsing: Empty enum name
};

class CfgPatches {
class DU_RTA {
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.0;
};
};

class CfgVehicleClasses { 
   class DU_RTA { 
       displayName = "DU - RTA"; 
   }; 
};  

class cfgVehicles {
class FlagCarrier;	// External class reference

class du_roadsign_speed : FlagCarrier {
	scope = public;
	icon = "\ca\data\data\Unknown_object.paa";
	mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	displayName = "Speed Camera Sign";
	model = "\DU_RTA\du_roadsign_speed.p3d";
	vehicleClass = DU_RTA;
 };   

   class du_speedcam : FlagCarrier {
       scope = public;	
	icon = "\ca\data\data\Unknown_object.paa";
       mapSize = 0.7;
	accuracy = 0.2;	// accuracy needed to recognize type of this target
	displayName = "Speed Camera";  
       model = "\DU_RTA\du_speedcam.p3d";
       vehicleClass = DU_RTA;		
};
};

Also to note: When i put the Du_objects.pbo in and when I go in the editor, the DU_rta.pbo is not there?!. Got out and deleted the objects.pbo and went back in and the du_rta was there and working... Me confused :(

Edited by Mattaus

Share this post


Link to post
Share on other sites

Ok I did a bit of checking, It turns out that the PREFIX is going to: du_rta, when it should go as du_objects?

I checked the config.cpp for du_objects and no-where does it say RTA at all.

Also, I have an unwanted model that keeps coming up even when it's not in the folder that I chose to pack? Just to be sure I uploaded that model to my email, then i deleted that model off the whole computer which is du_policebase.p3d (not completed yet, so don't want it in). Then when i use PBOVIEW to check, it's in there again? HOW?!! Also the prefix as above is staying as du_rta and should be du_objects..

I think i'm going mentally ill. Ill post a video of it if I have to....

---------- Post added at 04:24 PM ---------- Previous post was at 03:28 PM ----------

Nevermind, I found out the problem and It all works smoothly, it was just BinPBO, I forgot I had set the prefix in binpbo to du_rta, and just changed the name of it, plus I ticked on clear temp folder, which got rid of that unneeded model.

A BIG THANK YOU TO YOU ALL THAT HAVE HELPED. This thread can now be closed, or keep it running for other people need help.

Edited by Mattaus

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×