![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | eddem_abdielW |
i try to apply a dialogue system in godot 4, that system was built in godot 3, i’m a begginer on godot, and don’t have any idea of how fix it, and don’ find nothing about yet.
export (String, FILE, "*.json") var d_file
func load_dialogue():
var file = File.new()
if file.file_exists(d_file):
file.open(d_file, file.READ)
return parse_json(file.get_as_text())
i write this code in godot 3.5 after, thinking that, exporting this code from godot 3 to 4, the godot correction to new version, could solve this, but even changing the code like this:
@export var d_file:JSON
func load_dialogue():
var file = File.new()
if file.file_exists(d_file):
file.open(d_file, file.READ)
var test_json_conv = JSON.new()
test_json_conv.parse(file.get_as_text())
return test_json_conv.get_data()
the code upward is in godot 4, which is the really tha don’t works, i tried FileAcess, FileDialog, but just problems come.