From c6d224c4ea0b6b7d7a0aa382e8c1ea4b2579ee15 Mon Sep 17 00:00:00 2001 From: Yunusemre-Oeztuerk <115316627+Yunusemre-Oeztuerk@users.noreply.github.com> Date: Mon, 8 May 2023 14:42:15 +0200 Subject: [PATCH] Error in gdexample.cpp When adding the getter and setter functions to the example project a void has been added to the constructor in line 439 which was previously not there (in line 213) and is also causing the error C2533: constructors not allowed a return type. Simply removing it again fixes it. --- tutorials/scripting/gdextension/gdextension_cpp_example.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/scripting/gdextension/gdextension_cpp_example.rst b/tutorials/scripting/gdextension/gdextension_cpp_example.rst index d6d8f7e01b7..e3c4d02e765 100644 --- a/tutorials/scripting/gdextension/gdextension_cpp_example.rst +++ b/tutorials/scripting/gdextension/gdextension_cpp_example.rst @@ -442,7 +442,7 @@ show the methods we end up changing, don't remove the lines we're omitting: ClassDB::add_property("GDExample", PropertyInfo(Variant::FLOAT, "amplitude"), "set_amplitude", "get_amplitude"); } - void GDExample::GDExample() { + GDExample::GDExample() { // Initialize any variables here. time_passed = 0.0; amplitude = 10.0;