Skip to content

[4.x] Duplicating a global named script class (i.e. in script_extension.gd) causes "hides a global script class" error #345

@ColdCalzone

Description

@ColdCalzone

In the process of extending a script, this is run:

# We want to save scripts for resetting later
# All the scripts are saved in order already
if not ModLoaderStore.saved_scripts.has(parent_script_path):
ModLoaderStore.saved_scripts[parent_script_path] = []
# The first entry in the saved script array that has the path
# used as a key will be the duplicate of the not modified script
ModLoaderStore.saved_scripts[parent_script_path].append(parent_script.duplicate())

This causes an error, Parser Error: Class "ClassName" hides a global script class."

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.xbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions