- Edited
hello,
I am having an error in converting a project to godot 4,
the problem seems to be in 3.5 i needed to save the file has a var.
In godot 4 when i open the file and try to get this var, the log seems to be wrong
this is the function I am using to save the file in 3.5
func _saveAnim():
if ( saveFileName == "" ):
saveFileName = "noName";
var file = File.new()
file.open(saveFileName, File.WRITE)
file.store_var(root1);
file.close()
saveLock = false;
the function to load the file var in godot 4
func _loadAnim( loadFileName ):
var file = FileAccess.open(loadFileName, FileAccess.READ)
var animFile = file.get_var();
file = null # File is closed.
return( animFile );
this is the root1 print log in 3.5
--- Debugging process started ---
Godot Engine v3.5.rc5.official.ae6059793 - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
Async. shader compilation: ON (full native support)
Shader cache: ON
{Fnum:[{hEx:{fm:0, pa:0, pos:(0, -82), pz:9, scl:(1, 1), vs:False}, pt1:{dn1:(-3, 3), dn2:(0, 3), dn3:(3, 3), fm:0, md1:(-3, 0), md2:(0, 0), md3:(3, 0), pa:0, pos:(-1.5, -49.5), pz:0, up1:(-3, -3), up2:(0, -3), up3:(3, -3)}, pt10:{dn1:(-5, 2), dn2:(0, 2), dn3:(5, 2), fm:0, md1:(-5, -1), md2:(0, -1), md3:(5, -1), pa:0, pos:(-4.5, -3), pz:9, up1:(-5, -4), up2:(0, -4), up3:(5, -4)}, pt11:{dn1:(-5, 9), dn2:(0, 9), dn3:(5, 9), fm:0, md1:(-5, 1), md2:(0, 1), md3:(5, 1), pa:0, pos:(-3.5, -14), pz:10, up1:(-5, -8), up2:(0, -8), up3:(5, -8)}, pt12:{dn1:(-5, 11), dn2:(0, 11), dn3:(5, 11), fm:0, md1:(-5, 1), md2:(0, 1), md3:(5, 1), pa:0, pos:(-2.5, -36), pz:11, up1:(-5, -10), up2:(0, -10), up3:(5, -10)}, pt13:{dn1:(-3, 3), dn2:(0, 3), dn3:(3, 3), fm:0, md1:(-3, 0), md2:(0, 0), md3:(3, 0), pa:0, pos:(-3, -42.5), pz:12, up1:(-3, -3), up2:(0, -3), up3:(3, -3)}, pt14:{dn1:(-5, 7.5), dn2:(0, 7.5), dn3:(5, 7.5), fm:0, md1:(-5, 0), md2:(0, 0), md3:(5, 0), pa:-12, pos:(-5.5, -52), pz:13, up1:(-5, -7.5), up2:(0, -7.5), up3:(5, -7.5)}, pt15:{dn1:(-5, 7), dn2:(0, 7), dn3:(5, 7), fm:0, md1:(-5, 0), md2:(0, 0), md3:(5, 0), pa:9, pos:(-5.5, -66.5), pz:14, up1:(-5, -7), up2:(0, -7), up3:(5, -7)}, pt2:{dn1:(-3.75, 0.25), dn2:(0, 0.25), dn3:(3.75, 0.25), fm:0, md1:(-3.75, 0), md2:(0, 0), md3:(3.75, 0), pa:0, pos:(-1, -57.5), pz:1, up1:(-3.75, -0.25), up2:(0, -0.25), up3:(3.75, -0.25)}, pt3:{dn1:(-3.5, 4.75), dn2:(0, 4.75), dn3:(3.5, 4.75), fm:0, md1:(-3.5, 1), md2:(0, 1), md3:(3.5, 1), pa:10, pos:(-1.5, -67.5), pz:2, up1:(-3.5, -3.75), up2:(0, -3.75), up3:(3.5, -3.75)}, pt4:{dn1:(-5, 2), dn2:(0, 2), dn3:(5, 2), fm:0, md1:(-5, -1), md2:(0, -1), md3:(5, -1), pa:0, pos:(-2.5, -3), pz:3, up1:(-5, -4), up2:(0, -4), up3:(5, -4)}, pt5:{dn1:(-5, 9), dn2:(0, 9), dn3:(5, 9), fm:0, md1:(-5, 1), md2:(0, 1), md3:(5, 1), pa:0, pos:(-1.5, -14), pz:4, up1:(-5, -8), up2:(0, -8), up3:(5, -8)}, pt6:{dn1:(-5, 11), dn2:(0, 11), dn3:(5, 11), fm:0, md1:(-5, 1), md2:(0, 1), md3:(5, 1), pa:0, pos:(-0.5, -36.5), pz:5, up1:(-5, -10), up2:(0, -10), up3:(5, -10)}, pt7:[...]
the root1 print log in godot 4, shows diferent values without the vars names.
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
[X: (0, 4747321238252559500000000000, 0), Y: (0, 0, 0), Z: (0, 0, 0), O: (0, 0, 0)]
in 3.5 the file is right root1 contains the Fnum[]
in 4 i get an error saying Fnum doesnt exist