Jump to content
Sign in to follow this  
{9thInf}Winchester Delta1

Mission crashes: error= member allready defined

Recommended Posts

Hello guy's, after a cople day's of making up a mission for ARMA, i stumbled upon a problem when i try to start the mission. The mission whon't start and i crash to desktop right away.

Than ARMA comes with a error message:c:c:\documents and settings\administrator\Arma other profiles\cpl winchester\missions\All_ghillied _up.Sara\description.ext, line 84: .cfgSounds: Member already defined

Please can somebody help me out what this exactly means and what i can do to fix it. Cause i see that it has something to do with the sounds... but does it mean that i called upon an sound resource twice. And that that action isn't allowed. I'm using my own sounds and there are aslo sounds included in the revive script i put in. I wood appreciate if somebody cood help me out.. than i didn't waste alot of time making this mission.

Allready alot of thanks..

Share this post


Link to post
Share on other sites

It sounds like a problem that happened to me today that required me to fix my electrical grids script pack. I suspect that two classCfg sounds are being created. Once by you in the Description.ext and once by the revive script or some other means.

If you are using Norrin's revive in the Description.ext file there is a probably a line like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#include "revive_sqf\dialogs\config.cpp"

This line includes a config.cpp that defines/creates a classCfg sounds for the revive script (I think - I have never worked with config.cpp files, only .hpp files). I am pretty sure this will conflict with any sounds you might add to class cfgSounds in the Description.ext (If you aren't using norrin's, there is probably a similar line that includes a .cpp, .hpp or .h file somewhere that does something similar)

The only way to avoid the conflict is to only define one class cfgSounds in the Description.ext and directly add the individual sounds there or use the #include command within the class CfgSounds that includes a file that only defines sounds, not an entirely different class cfgSounds. Here is an example:

Description.ext

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgSounds

{

sounds[] = {};

#include "ScriptSounds.hpp" // Adds customs sounds in a seperate file

mySound1

{

name = "";

sound[] = {"\sound\ mySound1.ogg", 1, 1};

titles[] = {};

};

mySound2

{

name = "";

sound[] = {"\sound\ mySound2.ogg", 1, 1};

titles[] = {};

};

ScriptSounds.hpp

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class scriptSound1

{

name = "";

sound[] = {"\SEG\Sounds\scriptSound1.ogg", 1, 1};

titles[] = {};

};

class scriptSound2

{

name = "";

sound[] = {"\SEG\Sounds\scriptSound2.ogg", 1, 1};

titles[] = {};

};

This adds mySounds 1 & 2 in the .ext directly and scriptSound 1 & 2 via the #include.

OR

you could add your sounds to the .cpp/.hpp.

Either way this can be tricky because making these kind of changes can cause sounds not to play or scripts not work or even further errors/crashes. If you post at least part of your Description.Ext that shows all the #include statements and class cfgSounds, we can probably track down the exact problem and find the best solution.

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  

×