ERROR after export windows or android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Leifer
:warning: Old Version Published before Godot 3 was released.

Hi guys, sorry for my english :wink: i’m just a french frog :smiley:
Well, I create a save system, really simple, write in JSON file. When I launch a demo on Godot there is no problem, everything works fine. But after export (for win and android) I have an Error in debug console.

ERROR: _File::store_line: Condition ' !f ' is true.
At: core\bind\core_bind.cpp:1687 

My script :

data = {"_Save" : {"dial" : saveDial,"rep" : saveRep}}
var file = File.new()
file.open("res://json/savelogs.json", File.WRITE)
file.store_line(data.to_json())
file.close()

I add *.json on “Filters to export non-resource files” and I choose “Export all resources in the project”. I use godot v2.1.4 on win 10 x64.

Any idea ?!

:bust_in_silhouette: Reply From: volzhs

generated data in game should be stored under user:// instead of res://
mostly, it’s prohibited to modify resources under res://

That works fine !! Thanks a lot :wink:

Leifer | 2017-10-03 10:33