Jump to content
Sign in to follow this  
austin_medic

Dialog Errors

Recommended Posts

I've got a little problem that has left me scratching my head with my dialog.

it reads "error on line 11: config: '{' after class myItems: RscListboxable ['GUI_BCG_RGB_B',0.9962]

My dialog:

[spoiler]class AUSMD_Inv
{
idd = 12085;
movingEnable = false;
moving = -1;
onLoad = "";
onUnload = "";
controlsBackground[] = {};
controls[] =
{
	class myItems: RscListbox <---- line 11 is here
	{
		idc = 1500;
		x = 6.5 * GUI_GRID_W + GUI_GRID_X;
		y = 4 * GUI_GRID_H + GUI_GRID_Y;
		w = 11.5 * GUI_GRID_W;
		h = 10 * GUI_GRID_H;
	};
	class amountEdit: RscEdit
	{
		idc = 1400;
		x = 19 * GUI_GRID_W + GUI_GRID_X;
		y = 4.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 4 * GUI_GRID_W;
		h = 1.5 * GUI_GRID_H;
	};
	class useButton: RscButton
	{
		onButtonClick = "[(lbCurSel 1500),(ctrlText 1400)] execVM ""inventoryUse.sqf"";";

		idc = 1600;
		text = "Use!"; //--- ToDo: Localize;
		x = 6.5 * GUI_GRID_W + GUI_GRID_X;
		y = 14.5 * GUI_GRID_H + GUI_GRID_Y;
		w = 5 * GUI_GRID_W;
		h = 1.5 * GUI_GRID_H;
	};
};
};
[/spoiler]

Share this post


Link to post
Share on other sites

YOu need to use class controls, I think...

class AUSMD_Inv 
{ 
idd = 12085; 
movingEnable = false; 
moving = -1; 
onLoad = ""; 
onUnload = ""; 
controlsBackground[] = {}; 

class Controls 
{ 
	class myItems: RscListbox 
	{ 
		idc = 1500; 
		x = 6.5 * GUI_GRID_W + GUI_GRID_X; 
		y = 4 * GUI_GRID_H + GUI_GRID_Y; 
		w = 11.5 * GUI_GRID_W; 
		h = 10 * GUI_GRID_H; 
	};
//.....
//.....
};

Share this post


Link to post
Share on other sites

I believe Fight9 is right, "controls" is a class, not an array (besides, the way you have it is not an array anyway).

Share this post


Link to post
Share on other sites

It either needs to be....

An ARRAY of control names

controls[] = { myTextCntrl };
class myTextCntrl : RscText
{
    //blah
};

OR

A class holding controls

class controls {
    class myTextCntrl : RscText
    {
         //blah
    };
};

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  

×