diff --git a/cmake/scripts/SquirrelExport.cmake b/cmake/scripts/SquirrelExport.cmake index 548ce4ae7f..d4e457861d 100644 --- a/cmake/scripts/SquirrelExport.cmake +++ b/cmake/scripts/SquirrelExport.cmake @@ -353,7 +353,7 @@ foreach(LINE IN LISTS SOURCE_LINES) else() string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine, \"${API_SUPER_CLS}\");") endif() - if(NOT "${SUPER_CLS}" MATCHES "^ScriptEvent") + if(NOT "${SUPER_CLS}" MATCHES "^ScriptEvent" AND NOT "${CLS}" STREQUAL "ScriptEvent") if("${CLS_PARAM_2}" STREQUAL "v") string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.AddSQAdvancedConstructor(engine);") else() diff --git a/src/script/api/script_event.hpp b/src/script/api/script_event.hpp index 09fbb643eb..e706151b74 100644 --- a/src/script/api/script_event.hpp +++ b/src/script/api/script_event.hpp @@ -61,6 +61,7 @@ public: ET_PRESIDENT_RENAMED, }; +#ifndef DOXYGEN_API /** * Constructor of ScriptEvent, to get the type of event. * @param type The type of event to construct. @@ -68,6 +69,7 @@ public: ScriptEvent(ScriptEvent::ScriptEventType type) : type(type) {} +#endif /* DOXYGEN_API */ /** * Get the event-type. diff --git a/src/script/api/script_includes.hpp.in b/src/script/api/script_includes.hpp.in index bf9bcda04b..e3136e49f3 100644 --- a/src/script/api/script_includes.hpp.in +++ b/src/script/api/script_includes.hpp.in @@ -13,7 +13,7 @@ ${SQUIRREL_INCLUDES} static SQInteger ${APIUC}ObjectConstructor(HSQUIRRELVM vm) { - return sq_throwerror(vm, "${APIUC}Object is not instantiable"); + return sq_throwerror(vm, "This class is not instantiable"); } static SQInteger ${APIUC}ObjectCloned(HSQUIRRELVM)