Skip to content

GDExtension tutorial missing values #7480

@dcuny

Description

@dcuny

Your Godot version: 4.0.1

Issue description: GDExtension tutorial has a number of typos

URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html

These also appear in the unstable version of the documentation.

In the portion that extends the features, the GDExample constructor has a void as the return type, which shouldn't be on a constructor:

void GDExample::GDExample() {
    time_passed = 0.0;
    amplitude = 10.0;
    speed = 1.0;
}

There are two errors in gdexample.h. With set_speed and get_speed missing a const:

void set_speed(double p_speed);
double get_speed();

instead of being:

void set_speed(const double p_speed);
double get_speed() const;

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:manualIssues and PRs related to the Manual/Tutorials section of the documentationbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions