Browse Source

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.
Yunusemre-Oeztuerk 2 years ago
parent
commit
c6d224c4ea
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tutorials/scripting/gdextension/gdextension_cpp_example.rst

+ 1 - 1
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;