Get_open_error() Help

Godot Version

4.3

Question

I am working on code in my project related to encryption, and am getting errors when opening the file, when I try to and diagnose this I tried to use get_open_error() or FileAccess.get_open_error(), but this would just return zero and not the ‘OK’ or error code I would expect. And I cant try to call it on the variable that failed reading the file, as ‘Cannot call method ‘get_open_error’ on a null value’.

The documentation doesn’t tell me much, so I was hopping someone here could elaborate on how this command is suppose to work? Any help greatly appreciated!

Could you paste your script?

But zero is the “OK”, this is an enumeration, that’s in the docs:

2 Likes

Ah okay, thank you! I didn’t know it would print/return the enum of the code, that explains things. Thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.