Hello:
I have just started making executables and sharing them with friends and family for feedback. Godot 4 beta, linux and windows.
First, It appears that the following line of code gives an error in the build, but not the editor.
const texture : Texture = preload("res://path_to_texture.jpg").
It gave the following error:
ERROR: Parser bug (please report): tried to assign unset node without an identifier.
at: resolve_class_interface (modules/gdscript/gdscript_analyzer.cpp:656)
ERROR: Parser bug (please report): Trying to check compatibility of unset value type
at: is_type_compatible (modules/gdscript/gdscript_analyzer.cpp:4050)
SCRIPT ERROR: Parse Error: Could not resolve class "MainHudBuildingButton", because of a parser error.
at: GDScript::reload (res://Scenes/HudMenu/VerMenu.gd:73)
Reporting it here, since it says please report.
Replacing the const with regular @onready var worked.
Second set of errors are as follows:
ERROR: Unable to open file: res://.godot/imported/sun.jpg-53b67b49fbc59e27a4b15b0b40e23e55.s3tc.ctex.
at: _load_data (scene/resources/texture.cpp:823)
ERROR: Unable to open file: res://.godot/imported/t.409.png-442c8d4b1b220bb26b1d8e6ad4a1e1fa.s3tc.ctex.
at: _load_data (scene/resources/texture.cpp:823)
ERROR: Unable to open file: res://.godot/imported/v.401.png-6f100530fe5d61b5b568fc2db0e44af3.s3tc.ctex.
at: _load_data (scene/resources/texture.cpp:823)
ERROR: Unable to open file: res://.godot/imported/c.4.png-b68709f9c32d134787e7f27e10467295.s3tc.ctex.
at: _load_data (scene/resources/texture.cpp:823)
These files are not usual files. In the game, there are ten objects, and a pool of one hundred textures for them. For each object, a texture is selected at random at game start. To avoid loading all 100 textures into memory, the code only loads their paths at start up, and only loads the actual texture if that specific texture is chosen. The process works for most, but not all textures, as indicated by the errors? Where do I start looking?
Third set of errors -- any way to quickly find where the problem lies?
ERROR: Signal 'gui_input' is already connected to given callable 'Control(Sector.gd)::on_gui_input' in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal 'mouse_exited' is already connected to given callable 'Control(Sector.gd)::on_mouse_exited' in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal 'gui_input' is already connected to given callable 'Control(Bar.gd)::on_gui_input' in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal 'gui_input' is already connected to given callable 'Control(BridgeController.gd)::on_gui_input' in that object.
at: connect (core/object/object.cpp:1269)
And the fourth question -- where can I read about what a .pck file is? What is the advantage of having a separate executable, and a separate package file? and how many package files should I split the game into?