+2 votes

I have a project where I am dynamically creating a grid of nodes for a character selection window. For whatever reason I've been having trouble convincing the export to:

  • A) bring the image files for those nodes along when exporting,

  • B) load a json file that was meant to circumvent this issue

  • C) load a csv file that assists in organizing these nodes when they're created

I receive an error when trying to run the executable created from exporting the project and moving it to another folder:

Error opening json image file
ERROR: File must be opened before use.
   At: core/bind/core_bind.cpp:1956
ERROR: File must be opened before use.
   At: core/bind/core_bind.cpp:2058
SCRIPT ERROR: load_characters: Invalid get index '2' (on base: 'PoolStringArray').
          At: res://scripts/char_container.gdc:73

The error referenced here shows up on the first attempt to access the csv to refer an element generated from the dictionary.

If run inside the project folder, the project works fine. But removing the executable and placing it anywhere else loses track of the json and csv files, leading me to believe it is not building with those files internalized, despite including them into the export dialog.

Trying to check the export via exporting to a zip file seems to imply more problems as I only have a single .gdc file for a Node2D.gdc (everything I'm using is a control node: I don't use a Node2D anywhere in my project except possibly for a random experiment file not referenced by anything).

ADDITIONAL --------------------
From what I am observing - I decided to take the executable, move it to a new location in my files, made a file structure that mimics my project, and ran the executable.

I can say without a doubt - whether I use the json file, a resource preloader, or referencing the files via Directory, no matter what I do none of these files are internalized when I'm exporting, and I can't figure out why. The executable is referencing the files the same way as it would in-editor. It happens to the person who I shared the project with as well from the looks of it. This potentially would be great as it would make updating the data of the project quite easy, but it puts me in a bit of a bad situation with the project I'm doing at the moment (with copyrighted material and such).

Is there something I am missing? A setting that I may have messed up?

asked Mar 1 in Engine by haledire (64 points)
edited Mar 2 by haledire

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 How to use this Q&A? before posting your first questions.