hello, i cant seem to load json files, i keep getting the error invalid set index 'position' with value of type 'string'
i have the vector stored in --data.Fnum[0].pt1.pos--, save it to json from the original --root1.Fnum[0].pt1.pos-- they both print (-4, 41) although i think one is a string iam not sure... ?
is there a way parse json files as values ?
func _loadAnim():
if ( loadFileName != "" ):
var file = File.new();
file.open(loadFileName, File.READ);
var data = parse_json(file.get_as_text());
file.close()
#print(data.Fnum[0] )
#print(root1.Fnum[0] )
if typeof(data.Fnum[0].pt1.pos) == TYPE_STRING:
print("is string");
else:
print("jkfdhgjkfdhgjkfdhjkgh")
animFrameMax = data.Fnum.size();
#root1 = data;
isLoading = false;
#log: is string