Jump to content
Sign in to follow this  
helling3r

.HPP Error i cannot find. Probably really simple.

Recommended Posts

Hi there,

i keep getting errors with a .hpp i made for a GUI.

I cannot see any error, however arma.rpt complains...

Please advice!

The errors:

File gui\gui_transferMoney.hpp, line 88: '/TransferCOINFunds/controls/Value_DP_D          ash.text': Missing ';' prior '}'
File gui\gui_transferMoney.hpp, line 92: '/TransferCOINFunds/controls/Value_OP_D          ash.text': Missing ';' prior '}'
File gui\gui_transferMoney.hpp, line 88: '/TransferCOINFunds/controls/Value_DP_D          ash.text': Missing ';' prior '}'
File gui\gui_transferMoney.hpp, line 92: '/TransferCOINFunds/controls/Value_OP_D          ash.text': Missing ';' prior '}'

The code:

//
// GUI to transfer money from ones local COIN account to another player.
//

#define TextLeftX    0.020
#define HandlesLeftX 0.220
#define ValuesLeftX  0.555
#define ButtonsLeftX 0.750

class TransferCOINFunds {
 	idd = -1;   // set to -1, because we don't require a unique ID
onLoad = "[""initGUI""] ExecVM ""gui\gui_transferMoney.sqf""";
 	movingEnable = false;   // no movement while the dialog is shown
 	class controlsBackground {
	class MainBack : RscText {
			x = 0.010;
			y = 0.010;
			w = 0.950;
			h = 0.380;
			moving = 1;
			colorBackground[] = {0, 0, 0, 0.6};
	};
	class MainFrame : MainBack {
			colorText[] = {0, 0, 0, 1};
			style=ST_FRAME;
	};

	class MainTitle : RscText {
		x = 0.020;
		y = 0.023;
		w = 0.930;
		h = 0.050;
		text = "Transfer funds";
		colorText[] = {1, 1, 1, 1};
		colorBackground[] = {0, 0, 0, 0.8};
		sizeEx=FONT_SIZE_BIG;
	};

};

class controls {

	// Labels
	class Text_TargetPlayer : RscText {
		x = TextLeftX;
		y = 0.130;
		text = "Target player:";
		sizeEx=FONT_SIZE_NORMAL;
	};

	class Text_FundOP : Text_TargetPlayer {
		y = 0.180;
		text = "Offensive Points:";
	};

	class Text_FundDP : Text_TargetPlayer {
		y = 0.230;
		text = "Defensive Points:";
	};


	// Target selection and ammount-sliders
	class TargetUnit_Box : RscComboBox {
			idc = 22050;
			x = HandlesLeftX;
			y = 0.135;
			w = 0.500;
	};
	class FundsOPSlider : RscXSliderH {
		idc = 20002;
		x = HandlesLeftX;
		y = 0.180;
		w = 0.300;
	};
	class FundsDPSlider : RscXSliderH {
		idc = 20003;
		x = HandlesLeftX;
		y = 0.230;
		w = 0.300;
	};


	// Value labels
	class Value_OP_Sel : RscText {
		idc = 22001;
		x = ValuesLeftX;
		y = 0.180;
		text = "0000";
		sizeEx=FONT_SIZE_NORMAL;
	};
	class Value_DP_Sel : Value_OP_Sel {
		idc = 22002;
		y = 0.230;
	};
	class Value_DP_Dash : Value_DP_Sel {
		x = ValuesLeftX+0.06;
		text="/";
	};
	class Value_OP_Dash : Value_OP_Sel {
		x = ValuesLeftX+0.06;
		text="/";
	};
	class Value_OP_Cur : Value_OP_Sel {
		idc = 22003;
		x = ValuesLeftX+0.08;
	};
	class Value_DP_Cur : Value_DP_Sel {
		idc = 22004;
		x = ValuesLeftX+0.08;
	};

	// Buttons
	class ButtonOPTransfer : RscButton {
			x = ButtonsLeftX;
			y = 0.145;
			text = "transfer";
			action = "dtb_COINTRANSFER_MenuAction_TransferFundsType = 0; dtb_COINTRANSFER_MenuAction = 1";
	};
	class ButtonDPTransfer : RscButton {
			x = ButtonsLeftX;
			y = 0.205;
			text = "transfer";
			action = "dtb_COINTRANSFER_MenuAction_TransferFundsType = 1; dtb_COINTRANSFER_MenuAction = 2";
	};



	// close button
	class ButtonClose : RscButton {
			idc = 1;
			x = 0.430;
			y = 0.300;
			text = $STR_DISP_CLOSE;
			onButtonClick = "closeDialog 0;";
	};

};
};

Share this post


Link to post
Share on other sites

hmm, could it be because of "FONT_SIZE_NORMAL" and "FONT_SIZE_BIG" aren't defined in the hpp?

Share this post


Link to post
Share on other sites

Hi there, thank you for your reply.

All the constants are defined in the defaults.hpp.

The dialog appears and works as intended, i can see no error in-game.

Also i cannot find the specified syntax error, the RPT prints out.

It truly prints it two times, so maybe that points to a obfuscated other problem.

Share this post


Link to post
Share on other sites

use rapify (with lintcheck option) and squint if you arent already

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  

×