Hey everyone!
For my game (a currently unnamed RPG project) I wanted to create a dialog tree system. For this system I created a custom c# application that exports .json files in the format and with the information I need it to. The problem is that I cannot get Defold to properly load the files at all.
I have checked with an online JSON validator online to confirm that the JSON is in fact legitimate.
The problem seems to be linked entirely with the sys.load_resource() function. Whenever I attempt to use it, I get the error message:
Error: Failed to load resource: /main/level/levelList/SampleNPCArea/convos/sampleConvo1.json (-3) .
I am loading it like this:
local info = “”
local errorText = “”
info, errorText = sys.load_resource("/main/level/levelList/SampleNPCArea/convos/sampleConvo1.json")
return json.decode(info)
I saw in this documentation (https://defold.com/manuals/resource/) that I am suppose to do something with the Custom Resources setting in “game.project”. I have attempted to link the json file to that but it still fails.
I have tried copying and pasting the json file contents into a standard .txt but that fails to load too.
I have tried everything I can think of to trouble shoot. I have no idea that the (-3) means. Any suggestions for what I can try?
Thanks in advance!