Jump to content
Sign in to follow this  
Ser_Charles

No entry?

Recommended Posts

class RscText {
 type = CT_STATIC;
 idc = -1;
 style = ST_LEFT;
 colorBackground[] = {0, 0, 0, 1};
 colorText[] = {1, 1, 1, 1};
 font = FontM;
 sizeEx = 0.04;
 h = 0.04;
 text = "";
};

class My_BlueText : RscText {
 colorText[] = {0, 0, 1, 1};
 x = 0.1;
 w = 0.4;
};

class My_Dialog {
 //...

 controls[] = {
   My_Text_1,
   My_Text_2
 };

 class My_Text_1 : My_BlueText {
   text = "Line 1";
   y = 0.2;  
 };

 class My_Text_2 : My_BlueText {
   text = "Line 2";
   y = 0.25;  
 };
};

I defined those classes of UI in description.ext under the class "rscTitles", which is copied from arma wiki, But it reports an error says "no entry..." What does that mean?

Share this post


Link to post
Share on other sites

This is what I get from G.U.I. editor for class RscText you could be missing something.

class RscText
{
colorBackground[] = 
{
	0,
	0,
	0,
	0
};
colorText[] = 
{
	1,
	1,
	1,
	1
};
access = 0;
type = 0;
idc = -1;
text = "";
fixedWidth = 0;
x = 0;
y = 0;
h = 0.037;
w = 0.3;
style = 0;
shadow = 1;
colorShadow[] = 
{
	0,
	0,
	0,
	0.5
};
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
linespacing = 1;
tooltipColorText[] = 
{
	1,
	1,
	1,
	1
};
tooltipColorBox[] = 
{
	1,
	1,
	1,
	1
};
tooltipColorShade[] = 
{
	0,
	0,
	0,
	0.65
};
};

Share this post


Link to post
Share on other sites
This is what I get from G.U.I. editor for class RscText you could be missing something.

class RscText
{
colorBackground[] = 
{
	0,
	0,
	0,
	0
};
colorText[] = 
{
	1,
	1,
	1,
	1
};
access = 0;
type = 0;
idc = -1;
text = "";
fixedWidth = 0;
x = 0;
y = 0;
h = 0.037;
w = 0.3;
style = 0;
shadow = 1;
colorShadow[] = 
{
	0,
	0,
	0,
	0.5
};
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
linespacing = 1;
tooltipColorText[] = 
{
	1,
	1,
	1,
	1
};
tooltipColorBox[] = 
{
	1,
	1,
	1,
	1
};
tooltipColorShade[] = 
{
	0,
	0,
	0,
	0.65
};
};

I just copied your code into my description.ext, still the same error. I am thinking the problem may not be caused by these codes but others.

BTW, what is GUI editor?

---------- Post added at 15:53 ---------- Previous post was at 15:51 ----------

What is the rest of the error?

No entry

'mymissionroot\description.ext/rscTitles/My_Dialog.duration'.

Share this post


Link to post
Share on other sites

Well, everything you need to know is in the errorMessage.

You are missing the entry duration in your My_Dialog class.

try:

duration = 1;

Share this post


Link to post
Share on other sites
Well, everything you need to know is in the errorMessage.

You are missing the entry duration in your My_Dialog class.

try:

duration = 1;

I see now! Thanks.

Share this post


Link to post
Share on other sites

Since you are including this dialog in the RscTitles class it needs to have a few extra things defined. The error you are getting is telling you that in My_Dialog there is no duration member defined. In your My_Dialog class try putting

fadein = 0;
fadeout = 0;
duration = 1;

Share this post


Link to post
Share on other sites

If you need the hud to last for more than 1 second on the screen (ie; pretty much forever) you can use

duration = 1e+1000;

Edited by Iceman77

Share this post


Link to post
Share on other sites

Thats a mighty long time indeed, 1e8 is 3+ years :D

Share this post


Link to post
Share on other sites

Thank you all guys above, I have modified my class, and there is no error, but there is no control shown on the screen now...

This is what I have modified:

class rscTitles
{

 class RscText {
   type = CT_STATIC;
   idc = -1;
   style = ST_LEFT;
   colorBackground[] = {0, 0, 0, 1};
   colorText[] = {1, 1, 1, 1};
   font = FontM;
   sizeEx = 0.04;
   h = 0.04;
   text = "";
 };

 class My_BlueText : RscText {
   colorText[] = {0, 0, 1, 1};
   x = 0.1;
   w = 0.4;
 };

 class My_Dialog {
   //...
   idd=-1;
   fadein = 0;
   fadeout = 0;
   duration = 1;

   controls[] = {
     My_Text_1,
     My_Text_2
   };

   class My_Text_1 : My_BlueText {
     text = "Line 1";
     y = 0.2;  
   };

   class My_Text_2 : My_BlueText {
     text = "Line 2";
     y = 0.25;  
   };
 };
};

And in the initialization of a certain Unit I wrote:

cutRsc ["My_Dialog", "PLAIN", 1, false];

Share this post


Link to post
Share on other sites

The duration value is the time in seconds the dialog will remain open. If the duration is 1 the dialog will close rather quickly. Try setting duration to a large number, like 1e+1000 as mentioned above.

Share this post


Link to post
Share on other sites

And what is the default arma3 font? FontM seems does not exist in arma3.

---------- Post added at 03:20 ---------- Previous post was at 03:17 ----------

The duration value is the time in seconds the dialog will remain open. If the duration is 1 the dialog will close rather quickly. Try setting duration to a large number, like 1e+1000 as mentioned above.

I have tried but Still nothing shown on the screen.

Share this post


Link to post
Share on other sites

And I have tried some other codes given by arma3 wiki, also not working:(

like:

class MyHelloWorldDialog {
idd = -1;                      // set to -1, because we don't require a unique ID
movingEnable = true;           // the dialog can be moved with the mouse (see "moving" below)
enableSimulation = false;      // freeze the game
controlsBackground[] = { };    // no background controls needed
objects[] = { };               // no objects needed
controls[] = { MyHelloText };  // our "Hello world" text as seen below:
duration = 1e+1000;

class MyHelloText {
	idc = -1;              // set to -1, unneeded
	moving = 1;            // left click (and hold) this control to move the dialog
	                       // (requires "movingEnabled" to be 1, see above)
	type = CT_STATIC;      // constant
	style = ST_LEFT;       // constant
	text = "Hello world";
	font = FontM;
	sizeEx = 0.023;

	colorBackground[] = { 1, 1, 1, 0.3 };
	colorText[] = { 0, 0, 0, 1 };

	x = 0.8;
	y = 0.1;
	w = 0.2;
	h = 0.05;
};
};

Still nothing shown on the screen.

---------- Post added at 03:42 ---------- Previous post was at 03:41 ----------

I use puristaMedium.

Thanks.

Share this post


Link to post
Share on other sites
Take a look at this & also this. Between the two, you should be able get things rolling.

Wow, thanks a lot.

And, What is GUI editor? Is it built in Arma3? I haven't seen it anywhere in Arma3.

Share this post


Link to post
Share on other sites

It's built into the debug console esc + (F1) and click on the GUI editor button. Once inside the GUI editor, hit the 'H' key to bring up the help menu. It will list the controls and such, of the GUI editor.

---------- Post added at 19:17 ---------- Previous post was at 19:16 ----------

Also, I recommend using safeZone straight away when creating elements. You'll see a drop down menu when you go to edit an element. This will automatically make your dialog compatible with everyone's screen. Unles someone is using multiple monitors (which you'd need to counter with safeZoneABS .. I think it's called.)

Edited by Iceman77

Share this post


Link to post
Share on other sites
It's built into the debug console esc + (F1) and click on the GUI editor button. Once inside the GUI editor, hit the 'H' key to bring up the help menu. It will list the controls and such, of the GUI editor.

---------- Post added at 19:17 ---------- Previous post was at 19:16 ----------

Also, I recommend using safeZone straight away when creating elements. You'll see a drop down menu when you go to edit an element. This will automatically make your dialog compatible with everyone's screen. Unles someone is using multiple monitors (which you'd need to counter with safeZoneABS .. I think it's called.)

Thanks a lot, again.:)

Now I find the problem, maybe.

I transfer the code "cutRsc" to Init.sqf from the initialization of player unit, and then the GUI shows. I don't know why but perhaps it is because the initialization of units is too early?

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  

×