Search the Community
Showing results for tags 'Preprocessor instructions'.
Found 1 result
-
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: