Hello everyone.
I created a mock up of a chess-based game. The game reads the definition of all the pieces from a JSON at the start of the game.
It works all just fine when I am in Godot, but when I export the game (I tried export in HTML5 and MACOsX), it seems it cannot read the JSON and gives me the following errors:
**ERROR**: Condition ' !f ' is true. returned: String()
**ERROR**: At: core/bind/core_bind.cpp:1597:get_as_text() - Condition ' !f ' is true. returned: String()
**ERROR**: **SCRIPT ERROR**: Invalid call. Nonexistent function 'keys' in base 'Nil'.
**ERROR**: At: res://scenes/Model.gdc:40:_ready() - Invalid call. Nonexistent function 'keys' in base 'Nil'.
**ERROR**: **SCRIPT ERROR**: Invalid get index 'pos_in_the_grid' (on base: 'Nil').
**ERROR**: At: res://scenes/World.gdc:44:_ready() - Invalid get index 'pos_in_the_grid' (on base: 'Nil').
you can see the error here: https://notapixel.itch.io/summon-or-move
I left the debug option in order to see the errors.
The code is here
https://github.com/notapixelstudio/chess-kingdoms/blob/57a0e404161deb0e64f9a4102020561c44f85ca3/scenes/Model.gd#L11
https://github.com/notapixelstudio/chess-kingdoms/blob/master/scenes/Model.gd#L184-L195
I can't wrap my head around this. Please can anyone help?
P.S.: The resource of the JSON is correctly exported, you can find the structure of the project and the files in the download section.