ENIGMA Forums

Outsourcing saves money => Issues Help Desk => Topic started by: Yambam on June 13, 2016, 02:36:32 pm

Title: Lots of compile errors
Post by: Yambam on June 13, 2016, 02:36:32 pm
I get lots of errors when I try to compile my project in ENIGMA, including errors with the max function. How can I fix these? And also, is there an alternative for "else if"? Using that combination gives me a warning.

Code: [Select]
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_project_load(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:157:102: error: 'recent' was not declared in this scope
             for(enigma::varaccess_i(int(self))= min((enigma::varargs(), enigma::varaccess_length(int(recent))- 1, 6)); enigma::varaccess_i(int(self))>= 0; enigma::varaccess_i(int(self))-= 1)
                                                                                                      ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:163:40: error: 'recent' was not declared in this scope
             enigma::varaccess_name(int(recent))[int(0)]="seperator";
                                        ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:168:100: error: 'recent' was not declared in this scope
           for(enigma::varaccess_i(int(self))= min((enigma::varargs(), enigma::varaccess_length(int(recent))- 1, 6)); enigma::varaccess_i(int(self))>= 0; enigma::varaccess_i(int(self))-= 1)
                                                                                                    ^
                            ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:163:40: error: 'recent' was not declared in this scope
             enigma::varaccess_name(int(recent))[int(0)]="seperator";
                                        ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:168:100: error: 'recent' was not declared in this scope
           for(enigma::varaccess_i(int(self))= min((enigma::varargs(), enigma::varaccess_length(int(recent))- 1, 6)); enigma::varaccess_i(int(self))>= 0; enigma::varaccess_i(int(self))-= 1)
                                                                                                    ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:186:38: error: 'recent' was not declared in this scope
           enigma::varaccess_name(int(recent))[int(0)]= enigma::varaccess_name(int(other));
                                      ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:186:38: error: 'recent' was not declared in this scope
           enigma::varaccess_name(int(recent))[int(0)]= enigma::varaccess_name(int(other));
                                      ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_resources_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:346:91: error: '_w' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                           ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:346:111: error: '_h' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                                               ^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:356:91: error: '_w' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                           ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:356:111: error: '_h' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                                               ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_resources_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:346:91: error: '_w' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                           ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:346:111: error: '_h' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                                               ^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:356:91: error: '_w' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                           ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:356:111: error: '_h' was not declared in this scope
               enigma::varaccess_scale(int(self))= min((enigma::varargs(), size / (double) _w, size / (double) _h));
                                                                                                               ^
In file included from SHELLmain.cpp:105:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:441:106: error: 'shift' was not declared in this scope
         :: draw_line_dashed(xx - size / (double) 2, max((enigma::varargs(), yy + size / (double) 2, yy - shift)), xx - size / (double) 2, Y - size / (double) 2);
                                                                                                          ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:70:62: note: in definition of macro 'draw_line_dashed'
 #define draw_line_dashed(arguments...) _SCR_draw_line_dashed(arguments)
                                                              ^
In file included from SHELLmain.cpp:105:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:441:106: error: 'shift' was not declared in this scope
         :: draw_line_dashed(xx - size / (double) 2, max((enigma::varargs(), yy + size / (double) 2, yy - shift)), xx - size / (double) 2, Y - size / (double) 2);
                                                                                                          ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:70:62: note: in definition of macro 'draw_line_dashed'
 #define draw_line_dashed(arguments...) _SCR_draw_line_dashed(arguments)
                                                              ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_draw_scrollbar(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1390:205: error: 'dy' was not declared in this scope
           :: data_set(data, "value", median((enigma::varargs(), (mouse_y - y1)/ (double)(y2 - y1 - 2 * (x2 - x1))* (:: data_get(data, "max", 1)- :: data_get(data, "min", 0))+ :: data_get(data, "min", 0)- dy, :: data_get(data, "min", 0), :: data_get(data, "max", 1)- 1)));
                                                                                                                                                                                                             ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:50:46: note: in definition of macro 'data_set'
 #define data_set(arguments...) _SCR_data_set(arguments)
                                              ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_draw_scrollbar(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1390:205: error: 'dy' was not declared in this scope
           :: data_set(data, "value", median((enigma::varargs(), (mouse_y - y1)/ (double)(y2 - y1 - 2 * (x2 - x1))* (:: data_get(data, "max", 1)- :: data_get(data, "min", 0))+ :: data_get(data, "min", 0)- dy, :: data_get(data, "min", 0), :: data_get(data, "max", 1)- 1)));
                                                                                                                                                                                                             ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:50:46: note: in definition of macro 'data_set'
 #define data_set(arguments...) _SCR_data_set(arguments)
                                              ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1526:200: error: 'dx' was not declared in this scope
           :: data_set(data, "value", median((enigma::varargs(), (mouse_x)/ (double)(x2 - x1 - 2 * (y2 - y1))* (:: data_get(data, "max", 1)- :: data_get(data, "min", 0))+ :: data_get(data, "min", 0)- dx, :: data_get(data, "min", 0), :: data_get(data, "max", 1)- 1)));
                                                                                                                                                                                                        ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:50:46: note: in definition of macro 'data_set'
 #define data_set(arguments...) _SCR_data_set(arguments)
                                              ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1536:93: error: 'scroll_speed' was not declared in this scope
           :: data_set(data, "value", median((enigma::varargs(), :: data_get(data, "value")+ scroll_speed, :: data_get(data, "min", 0), :: data_get(data, "max", 1)- 1)));
                                                                                             ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:50:46: note: in definition of macro 'data_set'
 #define data_set(arguments...) _SCR_data_set(arguments)
                                              ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1526:200: error: 'dx' was not declared in this scope
           :: data_set(data, "value", median((enigma::varargs(), (mouse_x)/ (double)(x2 - x1 - 2 * (y2 - y1))* (:: data_get(data, "max", 1)- :: data_get(data, "min", 0))+ :: data_get(data, "min", 0)- dx, :: data_get(data, "min", 0), :: data_get(data, "max", 1)- 1)));
                                                                                                                                                                                                        ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:50:46: note: in definition of macro 'data_set'
 #define data_set(arguments...) _SCR_data_set(arguments)
                                              ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1536:93: error: 'scroll_speed' was not declared in this scope
           :: data_set(data, "value", median((enigma::varargs(), :: data_get(data, "value")+ scroll_speed, :: data_get(data, "min", 0), :: data_get(data, "max", 1)- 1)));
                                                                                             ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectdeclarations.h:50:46: note: in definition of macro 'data_set'
 #define data_set(arguments...) _SCR_data_set(arguments)
                                              ^
In file included from SHELLmain.cpp:109:0:
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1546:78: error: 'scroll_speed' was not declared in this scope
           enigma::varaccess_scroll_speed(int(self))= min((enigma::varargs(), scroll_speed + scroll_friction, 0));
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1546:78: error: 'scroll_speed' was not declared in this scope
                                                                              ^
           enigma::varaccess_scroll_speed(int(self))= min((enigma::varargs(), scroll_speed + scroll_friction, 0));
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1546:93: error: 'scroll_friction' was not declared in this scope
                                                                              ^
           enigma::varaccess_scroll_speed(int(self))= min((enigma::varargs(), scroll_speed + scroll_friction, 0));
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:1546:93: error: 'scroll_friction' was not declared in this scope
                                                                                             ^
           enigma::varaccess_scroll_speed(int(self))= min((enigma::varargs(), scroll_speed + scroll_friction, 0));
                                                                                             ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_window_get_maximalized(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:2595:24: error: lvalue required as left operand of assignment
   return window_get_x()= 0 && window_get_y()<= 40 && window_get_y()>= 1 && argument0 >= display_get_width()- 8;
                        ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_window_get_maximalized(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:2595:24: error: lvalue required as left operand of assignment
   return window_get_x()= 0 && window_get_y()<= 40 && window_get_y()>= 1 && argument0 >= display_get_width()- 8;
                        ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_draw_tab(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:3439:7: error: '_delete' was not declared in this scope
       _delete = 1; break;
       ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_draw_tab(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:3439:7: error: '_delete' was not declared in this scope
       _delete = 1; break;
       ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_window_init(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:3747:70: error: 'depth' was not declared in this scope
       enigma::glaccess(int(other))-> depth = min((enigma::varargs(), depth - 1, enigma::glaccess(int(other))-> depth));
                                                                      ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_window_init(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:3747:70: error: 'depth' was not declared in this scope
       enigma::glaccess(int(other))-> depth = min((enigma::varargs(), depth - 1, enigma::glaccess(int(other))-> depth));
                                                                      ^

C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_window_set_foreground(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:4059:42: error: 'depth' was not declared in this scope
         ndepth = min((enigma::varargs(), depth, ndepth));

C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_window_set_foreground(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:4059:42: error: 'depth' was not declared in this scope
         ndepth = min((enigma::varargs(), depth, ndepth));
                                          ^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_form_object_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:4434:84: error: '_w' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                    ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:4434:103: error: '_h' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                                       ^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_form_object_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:4434:84: error: '_w' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                    ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:4434:103: error: '_h' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                                       ^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_form_sound_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5601:84: error: '_w' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                    ^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_form_sound_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5601:84: error: '_w' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                    ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5601:103: error: '_h' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                                       ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5601:103: error: '_h' was not declared in this scope
         enigma::varaccess_scale(int(self))= min((enigma::varargs(), 128 / (double) _w, 128 / (double) _h));
                                                                                                       ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_form_room_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5863:99: error: '_w' was not declared in this scope
           enigma::varaccess_scale(int(self))= min((enigma::varargs(), min((enigma::varargs(), 80, _w))/ (double) _w, min((enigma::varargs(), 50, _h))/ (double) _h));
                                                                                                   ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5863:146: error: '_h' was not declared in this scope
           enigma::varaccess_scale(int(self))= min((enigma::varargs(), min((enigma::varargs(), 80, _w))/ (double) _w, min((enigma::varargs(), 50, _h))/ (double) _h));
                                                                                                                                                  ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_form_room_draw(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5863:99: error: '_w' was not declared in this scope
           enigma::varaccess_scale(int(self))= min((enigma::varargs(), min((enigma::varargs(), 80, _w))/ (double) _w, min((enigma::varargs(), 50, _h))/ (double) _h));
                                                                                                   ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:5863:146: error: '_h' was not declared in this scope
           enigma::varaccess_scale(int(self))= min((enigma::varargs(), min((enigma::varargs(), 80, _w))/ (double) _w, min((enigma::varargs(), 50, _h))/ (double) _h));
                                                                                                                                                  ^

C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_draw_textfield(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6389:54: error: 'xx' was not declared in this scope
           draw_rectangle(min((enigma::varargs(), sx, xx)), y1 + 3, :: max2(sx, xx)+ 1, y1 + 4 + h, 0);
                                                      ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_draw_textfield(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6389:54: error: 'xx' was not declared in this scope
           draw_rectangle(min((enigma::varargs(), sx, xx)), y1 + 3, :: max2(sx, xx)+ 1, y1 + 4 + h, 0);
                                                      ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_get_kind(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6935:154: error: '_char' was not declared in this scope
       while((string_length(string_digits(enigma::varaccess__char(int(self))))+ (ord(enigma::varaccess__char(int(self)))== median((enigma::varargs(), ord(_char), ord("a"), ord("f"))))
                                                                                                                                                          ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6936:11: error: 'hex' was not declared in this scope
         * hex + (ord(_char)== median((enigma::varargs(), ord(_char), ord("A"), ord("F"))))* enigma::varaccess_hex(int(self))+ :: string_is_at(".", argument0, pos)!= 0))
           ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_get_kind(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6935:154: error: '_char' was not declared in this scope
       while((string_length(string_digits(enigma::varaccess__char(int(self))))+ (ord(enigma::varaccess__char(int(self)))== median((enigma::varargs(), ord(_char), ord("a"), ord("f"))))
                                                                                                                                                          ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6936:11: error: 'hex' was not declared in this scope
         * hex + (ord(_char)== median((enigma::varargs(), ord(_char), ord("A"), ord("F"))))* enigma::varaccess_hex(int(self))+ :: string_is_at(".", argument0, pos)!= 0))
           ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6963:76: error: 'kind_length' was not declared in this scope
     enigma::varaccess__value(int(self))= string_copy(argument0, argument1, kind_length);
                                                                            ^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:6963:76: error: 'kind_length' was not declared in this scope
     enigma::varaccess__value(int(self))= string_copy(argument0, argument1, kind_length);
                                                                            ^
mingw32-make.exe[1]: Leaving directory `D:/ENIGMA/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
mingw32-make.exe[1]: Leaving directory `D:/ENIGMA/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
mingw32-make.exe: *** [Game] Error 2
mingw32-make.exe: *** [Game] Error 2

Last question, I get 25 variables "not declared in this scope", but it all worked in GameMaker. What am I missing here?
Title: Re: Lots of compile errors
Post by: Yambam on June 14, 2016, 08:39:08 am
One error that I don't understand:

Code: [Select]
d:\enigma\enigma\mingw32\include\c++\4.8.2\bits\basic_string.h:554:7: note:   no known conversion for argument 1 from 'variant' to 'const char*'
EDIT: I fixed it along with a wrongly placed assignment operator (it was meant as a comparison).
Title: Re: Lots of compile errors
Post by: Goombert on June 14, 2016, 02:19:47 pm
How are you calling min/max? There is currently a known parser bug that hasn't been fixed.

https://github.com/enigma-dev/enigma-dev/issues/214
Title: Re: Lots of compile errors
Post by: Yambam on June 14, 2016, 02:29:24 pm
How are you calling min/max? There is currently a known parser bug that hasn't been fixed.

https://github.com/enigma-dev/enigma-dev/issues/214
I solved it by making custom functions min2, max2 and median2, and then I did some find/replace. I'm through all the errors, but now it freezes while the screen is still black... Could you help me finding the problem? http://enigma-dev.org/forums/index.php?topic=2673.msg25961#new
Title: Re: Lots of compile errors
Post by: Goombert on June 14, 2016, 02:53:37 pm
Read the following tutorial that explains how to debug the game with GDB and show us a stack trace:

http://enigma-dev.org/forums/index.php?topic=1815
Title: Re: Lots of compile errors
Post by: Yambam on June 14, 2016, 03:41:12 pm
I don't know if you need this, but I got this:
Code: [Select]
Michael@GIGABYTE-2 /d/ENIGMA/ENIGMA
$ gdb C:\Users\Michael\AppData\Local\Temp\egm1662160408106033879.exe
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
C:UsersMichaelAppDataLocalTempegm1662160408106033879.exe: No such file or direct
ory.
(gdb) run
Starting program:
No executable specified, use `target exec'.
(gdb) target exec
No executable file now.
<\Michael\AppData\Local\Temp\egm1662160408106033879.exe
(gdb) run
Starting program: C:\Users\Michael\AppData\Local\Temp\egm1662160408106033879.exe

[New Thread 3120.0x1a8]
warning: Can not parse XML library list; XML support was disabled at compile tim
e
[New Thread 3120.0xe18]
[New Thread 3120.0x1d0]
[New Thread 3120.0xd58]
[New Thread 3120.0x9a0]
Initializing audio system...
Opening ALURE devices.
[New Thread 3120.0xf7c]
[New Thread 3120.0x4f4]
width: 200height: 200transparent: 0smoothEdges: 0preload: 0useAsTileset: 0tileWi
dth: 16tileHeight: 16hOffset: 0vOffset: 0hSep: 0vSep: 0Alloc size: 3484Adding ba
ckground: 0

width: 200height: 200transparent: 0smoothEdges: 0preload: 0useAsTileset: 0tileWi
dth: 16tileHeight: 16hOffset: 0vOffset: 0hSep: 0vSep: 0Alloc size: 2411Adding ba
ckground: 1


Program received signal SIGSEGV, Segmentation fault.
0x008ed067 in ?? ()
(gdb) bt
#0  0x008ed067 in ?? ()
#1  0x0043bdcf in ?? ()
#2  0x0053bb5c in ?? ()
#3  0x006fe199 in ?? ()
#4  0x006fe38d in ?? ()
#5  0x00408f8b in ?? ()
#6  0x00633306 in ?? ()
#7  0x0090879d in ?? ()
#8  0x004013de in ?? ()
#9  0x74e433ca in ?? ()
#10 0x771b9ed2 in ?? ()
#11 0x771b9ea5 in ?? ()
#12 0x00000000 in ?? ()
(gdb)
Title: Re: Lots of compile errors
Post by: Goombert on June 14, 2016, 03:45:44 pm
Did you run the game in debug mode? You have to hit the debug icon not the run icon and then do GDB. I think you hit the run button because it's showing ?? in the back trace which suggests there's no debugging symbols. If you run it in debug mode that will tell us file names and line numbers of the errors.
Title: Re: Lots of compile errors
Post by: Yambam on June 16, 2016, 02:24:19 am
Did you run the game in debug mode? You have to hit the debug icon not the run icon and then do GDB. I think you hit the run button because it's showing ?? in the back trace which suggests there's no debugging symbols. If you run it in debug mode that will tell us file names and line numbers of the errors.
I think GDB is showing the all the lines now.

Code: [Select]
nolan@HP-COMPAQ-5750 /f/ENIGMA/ENIGMA
$ gdb "C:\Users\nolan\AppData\Local\Temp\egm3629380217952681115.exe"
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Users\nolan\AppData\Local\Temp\egm3629380217952681115.ex
e...done.
(gdb) run
Starting program: C:\Users\nolan\AppData\Local\Temp\egm3629380217952681115.exe
[New Thread 324.0x3ac]
warning: Can not parse XML library list; XML support was disabled at compile tim
e
Initializing audio system...
Opening ALURE devices.
[New Thread 324.0x127c]
[New Thread 324.0x934]
width: 200height: 200transparent: 0smoothEdges: 0preload: 0useAsTileset: 0tileWi
dth: 16tileHeight: 16hOffset: 0vOffset: 0hSep: 0vSep: 0Alloc size: 3484Adding ba
ckground: 0

width: 200height: 200transparent: 0smoothEdges: 0preload: 0useAsTileset: 0tileWi
dth: 16tileHeight: 16hOffset: 0vOffset: 0hSep: 0vSep: 0Alloc size: 2411Adding ba
ckground: 1


Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x007c9e95 in enigma_user::surface_create (width=800, height=600,
    depthbuffer=false) at Graphics_Systems/OpenGL1/GLsurface.cpp:127
#2  0x00664727 in enigma::OBJ_obj_controller::myevent_create (this=0x21be740)
    at C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfu
nctionality.h:8232
#3  0x008834d5 in enigma::roomstruct::gotome (
    this=0xbdc8a8 <enigma::grd_rooms+1192>, gamestart=false)
    at Universal_System/roomsystem.cpp:193
#4  0x008877c8 in enigma::rooms_switch ()
    at Universal_System/roomsystem.cpp:835
#5  0x00407c69 in enigma::ENIGMA_events ()
    at C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_events.h
:138
#6  0x007a5555 in WinMain@16 (hInstance=0x400000, hPrevInstance=0x0,
    lpCmdLine=0x24247e7 "", iCmdShow=10)
    at Platforms/Win32/WINDOWSmain.cpp:356
#7  0x00b116cd in main ()
(gdb)

room_goto_next() resulted in an error BTW, so I used room_goto(rm_main) instead, maybe that problem is related?
Title: Re: Lots of compile errors
Post by: Goombert on June 16, 2016, 02:32:34 am
Code: [Select]
#0  0x00000000 in ?? ()
#1  0x007c9e95 in enigma_user::surface_create (width=800, height=600,
    depthbuffer=false) at Graphics_Systems/OpenGL1/GLsurface.cpp:127

Well that tells you right there... surface creation failed. You likely have poor OpenGL hardware support. You can find out or I can tell you if you run a hardware test:
http://enigma-dev.org/forums/index.php?topic=1131.0

Try Build->Settings->ENIGMA->API->Graphics->Direct3D9 and tell me how it goes.
Title: Re: Lots of compile errors
Post by: Yambam on June 16, 2016, 02:46:49 am
I've tried compiling with OpenGL on three HP computers, it won't work. These are the contents of glewinfo.txt:
http://pastebin.com/RGd3QH5r

... when I try compiling with DirectX 9.0, it won't compile:
http://pastebin.com/BY3W9wCr
Title: Re: Lots of compile errors
Post by: Goombert on June 16, 2016, 02:54:06 am
Ah that's from TheExDeus making depth buffers optional for surfaces. Here's a simple fix to try:

1) Go to the file ENIGMA/enigma-dev/ENIGMAsystem/SHELL/Graphics_Systems/Direct3D9/DX9surface.cpp
2) Add a parameter ", bool depthbuffer)" to surface_create exactly like that.
3) Save the file and try Direct3D9 again.

He didn't update the Direct3D subsystems when he made that change.
https://github.com/enigma-dev/enigma-dev/blob/483b2c54176df1ff6333a2ecd76f677c2a53d033/ENIGMAsystem/SHELL/Graphics_Systems/Direct3D9/DX9surface.cpp#L62

Please let me know if that works.

Regarding the GLEW file, yes that is the problem, I know for sure now. Your OpenGL does not support anything in GL 3.1 or later and framebuffer object's (the OGL equivalent of Direct3D surfaces) were introduced in OGL 3.2.

Quote
GL_VERSION_3_1:                                                MISSING
---------------
  glDrawArraysInstanced:                                       MISSING
  glDrawElementsInstanced:                                     MISSING
  glPrimitiveRestartIndex:                                     MISSING
  glTexBuffer:                                                 MISSING
 
GL_VERSION_3_2:                                                MISSING
---------------
  glFramebufferTexture:                                        MISSING
  glGetBufferParameteri64v:                                    MISSING
  glGetInteger64i_v:                                           MISSING
Title: Re: Lots of compile errors
Post by: Yambam on June 16, 2016, 03:36:36 am
Installed newer DirectX 9.0, it's coming further now. Now I need to change the code a lot since it uses argument_count. ;D
Title: Re: Lots of compile errors
Post by: TheExDeus on June 16, 2016, 04:01:38 am
Yeah, sorry I didn't change DX9.

You do have a 12 years old graphics card. That does limit on what you can do with it. I personally don't plan supporting anything nearly as old in the future, but that will probably be outside ENIGMA.
Title: Re: Lots of compile errors
Post by: Goombert on June 16, 2016, 04:22:06 am
Ah yeah we currently do not have support for argument_count, I see TheExDeus mentioned that to someone else a while ago. That's a parser thingy.
http://enigma-dev.org/forums/index.php?topic=2637.msg25647#msg25647

I went and added it to polygonz old list of parser/compiler issues.
https://github.com/enigma-dev/enigma-dev/issues/81
Title: Re: Lots of compile errors
Post by: Yambam on June 16, 2016, 05:13:55 am
Now it says trying to access uninitialized variable. Where can I see what variable it's talking about?
Title: Re: Lots of compile errors
Post by: Goombert on June 16, 2016, 05:14:32 am
Running in debug mode should tell you the variables name in a popup window.
Title: Re: Lots of compile errors
Post by: Yambam on June 16, 2016, 10:03:15 am
Running in debug mode should tell you the variables name in a popup window.
I don't see anything. I even made a test program with an nonexistent variable, but it doesn't give any error! ???
Title: Re: Lots of compile errors
Post by: Yambam on June 17, 2016, 11:46:17 am
I mean, I don't see any popup window or so. The game doesn't even reach a draw event, it shows the error in the create event.
Title: Re: Lots of compile errors
Post by: Goombert on June 17, 2016, 05:50:51 pm
I found the topic where I announced when I added it:
http://enigma-dev.org/forums/index.php?topic=1915

Does the error message look like that? It looks like I never got around to adding the actual variable names as debug symbols.
Title: Re: Lots of compile errors
Post by: Yambam on June 20, 2016, 11:20:50 am
Yes the error looks like that. I'm not coming much further without knowing what variable is causing the problem.

The error is probably caused by something in my JSON script:
Code: [Select]
/* data_add_from_json(data,jsonstr)
 * Add data from JSON.
 */
var data,jsonstr,jsonlen,level,_char,i,str,endchar,control,searchname,_str;
data=argument[0]
jsonstr=argument[1]

with(data)
{
  jsonlen=string_length(jsonstr)
  level=1
  array=(string_char_at(jsonstr,1)="[")
  searchname=!array
 
  i=1
  while(i<=string_length(jsonstr))
  {
    _char=string_char_at(jsonstr,i)
    //show_message(searchname*"Searching name..."+"#"+string_copy(jsonstr,i-7,7))
    if _char=","
    {
      if !array
        searchname=1
      i+=1
    }
    else if string_pos(_char,"-1234567890.")
    {
      str=_char
      i+=1
      _char=string_char_at(jsonstr,i)
      while(string_pos(_char,"1234567890."))
      {
        str+=_char
       
        i+=1
        _char=string_char_at(jsonstr,i)
      }
      value[length]=real(str)
      length+=1
    }
    else if string_pos(_char,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890$")
    {
      str=""
      while(string_pos(_char,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890$"))
      {
        str+=_char
       
        i+=1
        _char=string_char_at(jsonstr,i)
      }
     
      if str="true"
        str=1
      else if str="false"
        str=0
      else if str="ord"
      {
        if string_char_at(jsonstr,i+1)="("
        {
          i+=2
          endchar=string_char_at(jsonstr,i)
          i+=1
          control=0
          _char=string_char_at(jsonstr,i)
          while(_char!=endchar&&i<=string_length(jsonstr))
          {
            if _char="\"
              control=1
            else
            {
              if control
              {
                if _char="r"
                  str+=chr(13)
                else if _char="n"
                  str+=chr(10)
                else if _char="t"
                  str+=chr(9)
                else if _char="\"
                  str+="\"
                else if _char='"'
                  str+='"'
                else
                  str+="\"+_char
                control=0
              }
              else
                str+=_char
            }
           
            i+=2
            _char=string_char_at(jsonstr,i)
          }
          i+=1
          _char=string_char_at(jsonstr,i)
          str=ord(str)
        }
      }
      else if string_copy(str,1,3)="vk_"
      {
        if str="vk_control"
          str=vk_control
        else if str="vk_alt"
          str=vk_alt
        else if str="vk_shift"
          str=vk_shift
        else if str="vk_rcontrol"
          str=vk_rcontrol
        else if str="vk_ralt"
          str=vk_ralt
        else if str="vk_rshift"
          str=vk_rshift
        else if str="vk_lwin"
          str=vk_lwin
        else if str="vk_rwin"
          str=vk_rwin
        else if str="vk_space"
          str=vk_space
      }
     
      if !searchname
      {
        value[length]=str
        length+=1
      }
      else
        name[length]=str
      searchname=0
    }
    else if _char='"'||_char="'"
    {
      endchar=_char
      i+=1
      _char=string_char_at(jsonstr,i)
     
      str=""
      control=0
      if endchar='"' while((_char!=endchar||control)&&i!=jsonlen)
      {
        if _char="\"
          control=1
        else
        {
          if control
          {
            if _char="r"
              str+=chr(13)
            else if _char="n"
              str+=chr(10)
            else if _char="t"
              str+=chr(9)
            else if _char="\"
              str+="\"
            else if _char='"'
              str+='"'
            else
              str+="\"+_char
            control=0
          }
          else
            str+=_char
        }
       
        i+=1
        _char=string_char_at(jsonstr,i)
      }
      else while(_char!=endchar&&i!=jsonlen)
      {
        str+=_char
       
        i+=1
        _char=string_char_at(jsonstr,i)
      }
     
      if !searchname
      {
        value[length]=str
        length+=1
      }
      else
        name[length]=str
      searchname=0
     
      i+=1
      _char=string_char_at(jsonstr,i)
    }
    else if _char="{"&&i!=1
    {
      i+=1
      _char=string_char_at(jsonstr,i)
     
      value[length]=data_from_json(string_copy(jsonstr,i,string_length(jsonstr)-i+1),id)
      length+=1
      i+=skip
    }
    else if _char="}"||_char="]"
    {
      if argument[2]!=0
        argument[2].skip=i
      break
    }
    else if _char="["&&i!=1
    {
      value[length]=data_from_json(string_copy(jsonstr,i,string_length(jsonstr)-i+1),id)
      length+=1
      i+=skip
    }
    else
      i+=1
  }
 
  return id;
}

If I press Ignore 4 times, the script ends. Maybe you could do something with that?
Title: Re: Lots of compile errors
Post by: Yambam on July 01, 2016, 08:32:19 am
Could someone help me with my last post? ???

EDIT: I solved this problem, but now the problem is in this script:

Code: [Select]
/* data_copy_recursive(data)
 * Copy a data instance and all its child nodes.
 */
var data,copy,i,j;
data=argument0

with(data)
{
  copy=data_create()
  copy.length=length
  j=0
  for(i=0;i<length;i+=1)
  {
    if string_char_at(name[i],1)="<"&&string_char_at(name[i],string_length(name[i]))=">"
      continue
   
    copy.name[j]=name[i]
    if data_exists(value[i])
    {
      if name[i]="<hyperlink>"
        copy.value[j]=data_copy(value[i])
      else
        copy.value[j]=data_copy_recursive(value[i])
    }
    else
      copy.value[j]=value[i]
    j+=1
  }
  copy.length=j
 
  return copy;
}

return noone;

This is the script I use to detect an instance of data:

Code: [Select]
/* data_exists(data)
 * Check whether or not a data instance exists.
 */
var data;
data=argument0

if is_real(data) if data>=100001 if instance_exists(data) if data.object_index=obj_data
  return 1;

return 0;