Steezy
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout Steezy
-
Rank
Rookie
-
Steezy started following Dialog encountered error with constants
-
Dialog encountered error with constants
Steezy replied to Steezy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Many thanks for clarification guys ! Now I understood my mistakes in detail :)- 9 replies
-
- Error
- Preprocessor instructions
-
(and 1 more)
Tagged with:
-
Dialog encountered error with constants
Steezy replied to Steezy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey there ! @larrow: Thank you man! You saved my life! That was the problem... I don't know how I couldn't see it earlier. @KK: Thanks for the help, advise and tutorial ;) I'm not totally used with defines and dialogs are still a hard part for me. I'm trying to improve!- 9 replies
-
- Error
- Preprocessor instructions
-
(and 1 more)
Tagged with:
-
Dialog encountered error with constants
Steezy replied to Steezy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Indeed GUI_GRID 'constant' doesn't seem to be defined anywhere. However, that's not a blocking problem. If GUI_GRID_H is not defined and used with sizeEx propertie : the font won't be displayed on the dialog. My problem is the error message that is generated and that points to my color variables. I'll come back to you with custom mission scripts to prove you that the real problem is my color variables. But you can easily reproduce the error by defining global color variables and trying to insert them to color properties of a dialog.- 9 replies
-
- Error
- Preprocessor instructions
-
(and 1 more)
Tagged with:
-
Dialog encountered error with constants
Steezy replied to Steezy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey killzone_kid ! As you may know, there are 3 positioning modes in GUI editor : absolute, safezone and GUI_GRID. You did some tutorials about it :P Even if I use the safezone mode, font size is always product of grid height (GUI_GRID_H). So I consider this constant is defined somewhere in Arma cfg's and dialogs inherit. But I think it's not the problem. The error appears only when I use constants for the color properties (like colorBackground[], colorText[], etc...). All other constants are ok : font, type/style and GUI_GRID constants work correctly (tested without the color ones).- 9 replies
-
- Error
- Preprocessor instructions
-
(and 1 more)
Tagged with:
-
Dialog encountered error with constants
Steezy posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi folks ! Today I encountered some errors with my dialogs. I tried to split my stuff into different files to reorganize it. In this way, I created hpp-files to define engine-related / custom constants (as it's suggested here). So I created 1 file by constant type : controls.hpp (for control types and styles), fonts.hpp (for... fonts) and colors.hpp (for...tadam... colors). I also declare my basic ressource classes (RscText, RscStructuredText, etc...) in dialogs.hpp. All these files are included in my description.ext . This error appears when dialogs - including the color constants - are initialized (dialogs.hpp or CharactersList.h) : 15:33:34 Warning Message: File C:\Users\Steezy\Documents\Arma 3\missions\Test.Stratis\CharactersList.h, line 36: '/RscCharactersList/controlsBackground/MainTitle.': ';' encountered instead of '=' My game crashes if I try to preview the mission through the game editor or on dedicated server with the same error message. These are parts of my scripts : description.ext ... // GUI constants and base classes #include "controls.hpp" #include "colors.hpp" #include "fonts.hpp" #include "dialogs.hpp" // My dialogs #include "CharactersList.h" class RscTitles { #include "playerHUD.h" }; ... controls.hpp // ## Control types ## \\ #define CT_STATIC 0 #define CT_BUTTON 1 #define CT_EDIT 2 #define CT_SLIDER 3 #define CT_COMBO 4 #define CT_LISTBOX 5 ... // ## Control styles ## \\ // Static styles #define ST_POS 0x0F #define ST_HPOS 0x03 #define ST_VPOS 0x0C #define ST_LEFT 0x00 #define ST_RIGHT 0x01 #define ST_CENTER 0x02 #define ST_DOWN 0x04 ... colors.hpp (buggy script ?) #define COLOR_SLD_PURERED {1,0,0,1}; #define COLOR_SLD_PUREGREEN {0,1,0,1}; #define COLOR_SLD_PUREBLUE {0,0,1,1}; #define COLOR_SLD_PUREWHITE {1,1,1,1}; #define COLOR_SLD_PUREBLACK {0,0,0,1}; #define COLOR_SLD_DARKRED {0.6,0.2,0.2,1}; #define COLOR_TRANSPARENT {0,0,0,0}; ... fonts.hpp #define GUI_FONT_DEFAULT PuristaMedium #define GUI_FONT_NORMAL PuristaMedium #define GUI_FONT_BOLD PuristaSemibold #define GUI_FONT_THIN PuristaLight ... dialogs.hpp class RscText { idc = -1; type = CT_STATIC; style = ST_LEFT; x = 0; y = 0; h = 0.037; w = 0.3; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; font = GUI_FONT_NORMAL; colorText[] = COLOR_SLD_PUREWHITE; colorBackground[] = COLOR_TRANSPARENT; text = ""; shadow = 0; tooltip = ""; tooltipColorShade[] = {0,0,0,0.65}; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; deletable = 0; fade = 0; access = 0; fixedWidth = 0; colorShadow[] = {0,0,0,0.5}; linespacing = 1; }; ... CharactersList.h class RscCharactersList { idd=20003; onLoad="uiNamespace setVariable ['RscCharactersList', _this select 0]"; onUnload="uiNamespace setVariable ['RscCharactersList', displayNull]"; movingEnable="false"; enableSimulation="false"; class controlsBackground { class Image: RscPicture { idc = 1200; text = ""; x = 0.448438 * safezoneW + safezoneX; y = 0.148 * safezoneH + safezoneY; w = 0.0825 * safezoneW; h = 0.077 * safezoneH; }; class BlackBackground: RscText { idc = 1000; x = 0.293751 * safezoneW + safezoneX; y = 0.225 * safezoneH + safezoneY; w = 0.4125 * safezoneW; h = 0.55 * safezoneH; colorBackground[] = {0,0,0,1}; }; class MainTitle: RscText { idc = 1001; text = "Choose your character"; //--- ToDo: Localize; x = 0.29375 * safezoneW + safezoneX; y = 0.225 * safezoneH + safezoneY; w = 0.4125 * safezoneW; h = 0.044 * safezoneH; colorBackground[] = COLOR_SLD_DARKRED; sizeEx = 0.8 * GUI_GRID_H; }; }; class controls { class RscCombo_2100: RscCombo { idc = 2100; text = ""; //--- ToDo: Localize; x = 0.304062 * safezoneW + safezoneX; y = 0.291 * safezoneH + safezoneY; w = 0.216563 * safezoneW; h = 0.022 * safezoneH; colorText[] = {0,0,0,1}; colorBackground[] = {0.9,0.9,0.9,1}; }; class RscText_1003: RscText { idc = 1003; text = "Side :"; //--- ToDo: Localize; x = 0.402031 * safezoneW + safezoneX; y = 0.324 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.055 * safezoneH; }; }; }; I deliberately omit to change all the color propertie values of this script by constants to point on only one error. What have I done wrong ? Thx in advance :)- 9 replies
-
- Error
- Preprocessor instructions
-
(and 1 more)
Tagged with: