Jump to content
Sign in to follow this  
d3nn16

Error loading control - clean arma2oa.RPT

Recommended Posts

Hi,

I have a mission where player can open a custom made dialog. But every time it is opened I have the following 2 errors showing up in the arma2oa.RPT file :

Error loading control C:\Users\boson\Documents\ArmA 2 Other Profiles\eRazer\mpmissions\ctfs_template_[z]_v1-0.Desert_E\description.ext/OPT_DIAG_OPTIONS/Controls/GER_1_CGP/
Error loading control C:\Users\boson\Documents\ArmA 2 Other Profiles\eRazer\mpmissions\ctfs_template_[z]_v1-0.Desert_E\description.ext/OPT_DIAG_OPTIONS/Controls/GEN_0_CGP/

I am trying to fix all my mission scripts to remove any errors from the log file but I have no idea for this error.

Here is how I define the dialog controls that are responsible for the errors (taking GEN_0_CGP control as example) :

class OPT_DIAG_OPTIONS
{
idd = _IDD_OPTIONS_;
movingEnable = true;
onLoad = "uiNamespace setVariable ['OPT_DIAG_OPTIONS', (_this select 0)]";

class  ControlsBackground
{
	...
};

class Controls
{
	...
	#include "modules\gen.ext"
	...
};
};

modules\gen.ext file:

class GEN_0_CGP : OPT_TEMPL_CGP
{
idc = _IDC_GEN_0_CGP_;
x = _BODY_X_;
y = _BODY_Y_ + 2 * _H_;
w = _BODY_W_;
h = 19 * _H_ - _DH_;

class Controls
{
	...
};
};

OPT_TEMPL_CGP control:

class OPT_TEMPL_CGP : TEMPL_CGP
{
style = _ST_HUD_BACKGROUND_ + _ST_MULTI_;
x = 0;
y = 0;
w = 1;
h = 1;

colorBackground[] = {_COL_BG_};
shadow = false;

class VScrollbar {
	color[] = {1, 1, 1, 1};
	width = 0.021;
	autoScrollSpeed = -1;
	autoScrollDelay = 5;
	autoScrollRewind = 0;
	shadow = false;
};

class HScrollbar {
	color[] = {1, 1, 1, 1};
	height = 0.028;
	shadow = false;
};

class ScrollBar {
	color[] = {0, 1, 0, 0.6};
	colorActive[] = {1, 0, 0, 1};
	colorDisabled[] = {0, 0, 1, 0.3};
	thumb = "\ca\ui\data\igui_scrollbar_thumb_ca.paa";
	arrowFull = "\ca\ui\data\igui_arrow_top_active_ca.paa";
	arrowEmpty = "\ca\ui\data\igui_arrow_top_ca.paa";
	border = "\ca\ui\data\igui_border_scroll_ca.paa";
	shadow = false;
};

class Controls {};
};

TEMPL_CGP control:

class TEMPL_CGP
{
idc = -1;
type = _CT_CONTROLS_GROUP_;
style = _ST_MULTI_;
x = 0;
y = 0;
w = 1;
h = 1;

shadow = false;

class VScrollbar {
	color[] = {1, 1, 1, 1};
	width = 0.021;
	autoScrollSpeed = -1;
	autoScrollDelay = 5;
	autoScrollRewind = 0;
	shadow = false;
};

class HScrollbar {
	color[] = {1, 1, 1, 1};
	height = 0.028;
	shadow = false;
};

class ScrollBar {
	color[] = {1, 1, 1, 0.6};
	colorActive[] = {1, 1, 1, 1};
	colorDisabled[] = {1, 1, 1, 0.3};
	thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
	arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
	arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
	border = "\ca\ui\data\ui_border_scroll_ca.paa";
	shadow = false;
};

class Controls {};
};

Share this post


Link to post
Share on other sites

where is your controls array definition in the OPT_DIAG_OPTIONS dialog?

like

controls[] = {"GEN_0_CGP","GEN_1_CGP"};

Share this post


Link to post
Share on other sites

I am not using any controls array definition. Instead I am defining the "class Controls" and I put all controls inside.

Share this post


Link to post
Share on other sites

The classes of course too. You need both AFAIK.

Did you try to define the controls array?

Share this post


Link to post
Share on other sites

I did a quick try by just adding controls[] = {"GEN_0_CGP","GEN_1_CGP"}; to the OPT_DIAG_OPTIONS class and I have the following error :

ErrorMessage: File C:\Users\boson\Documents\ArmA 2 Other Profiles\eRazer\MPMissions\ctfs_template_[z]_v1-0.Desert_E\opt_options\description.ext, line 164: /OPT_DIAG_OPTIONS.Controls: Member already defined.

Also it will take me too much time to switch from using the Controls class to using the controls array because my OPT_DIAG_OPTIONS class (and more specifically the Controls class inside it) uses hundreds of controls (I am using a system where I hide/display controls depending on the selection in a drop-down list).

I am getting 0 errors in my log file except those concerning control groups. This seems like a specific error to control groups. All the other controls are working fine and no errors generated in the log file.

Any ideas ? Can you reproduce the same issue ?

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  

×