0 votes

In cmd, I typed the path to the game and received a long log. I think the bottommost error is caused by the one above it, and so on. At the very top, there are these errors:

ERROR: Condition "err" is true. Returned: err
 at: load_source_code (modules/gdscript/gdscript.cpp:775)
ERROR: Cannot load source code from file 'res://PackedCargo.gd'.
 at: (modules/gdscript/gdscript.cpp:2179)
ERROR: Failed loading resource: res://PackedCargo.gd. Make sure resources have been imported by opening the project in the editor at least once.
 at: (core/io/resource_loader.cpp:270)
SCRIPT ERROR: Parse Error: The class "PackedCargo" was found in global scope, but its script couldn't be loaded.
      at: GDScript::load_byte_code (res://Cargo.gdc:30)

Usually, PackedCargo.gd works fine, but not here. Here's code of PackedCargo:

extends Reference
class_name PackedCargo

var content
var number = 0

func _ready():
    pass # Replace with function body.

What might be the issue?

Godot version 3.4.2
in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.