Jump to content
Sign in to follow this  
fusion13

Just came back to Arma, can getting a weird error?

Recommended Posts

Well guys I am making a small script for a server and I get this error

No Entry MYFILEDIR/Controls/list/Box.ListScrollBar

Here is my cpp file:

class LIFEbaseShop
{
   idd = 30045;
   movingenable = true;
   onLoad = "uiNamespace setVariable ['fusD', (_this select 0)]"; 

class Controls
{

	class background: RscFrame
	{
		idc = 1800;
		text = "Buy Base"; //--- ToDo: Localize;
		x = 0.438125 * safezoneW + safezoneX;
		y = 0.367964 * safezoneH + safezoneY;
		w = 0.12375 * safezoneW;
		h = 0.308083 * safezoneH;
	};
	class listBox: RscListbox
	{
		idc = 1501;
		x = 0.443281 * safezoneW + safezoneX;
		y = 0.378967 * safezoneH + safezoneY;
		w = 0.113437 * safezoneW;
		h = 0.231062 * safezoneH;
		onLBDblClick = "[15001] call BASE_buy;"; 

	};
	class canc: RscButton
	{
		idc = 1600;
		text = "Cancel"; //--- ToDo: Localize;
		x = 0.443281 * safezoneW + safezoneX;
		y = 0.621033 * safezoneH + safezoneY;
		w = 0.113437 * safezoneW;
		h = 0.0330089 * safezoneH;
	};
};
};

I have been away for a while, so if someone could enlighten me on the changes :)

Thanks,

Fusion

Share this post


Link to post
Share on other sites

Go into your file that defines your listbox and change the scrollbar entry to listScrollbar.

IE;

   class listScrollBar
{
	color[] = {1, 1, 1, 1};
	colorActive[] = {1, 0.5, 0.5, 1};
    colorDisabled[] = {1, 1, 1, 1};

// . . . blah blah bla . . . //

Any time you've a NO ENTRY error, you've an undefined parameter / class for the control. >> No Entry MYFILEDIR/Controls/list/Box.theMissingParam

Edited by Iceman77

Share this post


Link to post
Share on other sites

Hey thanks man, got it working, but now can you look at my functions really quick, just kill 2 with one, why wont my stuff show up that I am adding

open_shop = {
createDialog "LIFEbaseShop";
waitUntil {dialog};
[15001] call BASE_items;
};

BASE_items = {
_listBox1 = _this select 0;
{lbAdd [_listBox1,_x];} forEach ["Large Sandbag Wall $1,500","Small Sandbag Wall $1,000"];
};

BASE_buy = {// >> Function Start
   _listBox1 = _this select 0;
_selection1 = lbCurSel _listBox1;
_text = lbText [_listBox1, _selection1];

switch (_selection1) do {
    case 0: {if (money >= 1500) then {[1500, "small"] call BASE_addItem;} else {hint "You don't have enough money.";};};
	case 1: {if (money >= 1000) then {[1000, "large"] call BASE_addItem;} else {hint "You don't have enough money.";};};

};
};// << Function End

BASE_addItem = {// >> Function Start
_cost = _this select 0;
_type = _this select 1;
money = money - _cost;
if (_type == "small") then
{
	hint "You bought a Small Sandbag Wall";
	large = smallWall + 1;
};
if (_type == "large") then
{
	hint "You bought a Large Sandbag Wall";
	large = largeWall + 1;
};
};// << Function End

Share this post


Link to post
Share on other sites
. . . why wont my stuff show up that I am adding . . .

When you call the BASE_items function after creating the dialog? Or which items and what function?

Share this post


Link to post
Share on other sites
When you call the BASE_items function after creating the dialog? Or which items and what function?

I call the open in a addaction, then that i think is called in the open isnt it? I am so old with this now :/

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  

×