I am trying to make a function-specific subclass of ConfigFile
. This is the skeleton I started with:
User.gd
:
extends ConfigFile
func _init():
load_user()
func load_user():
.load(Globals.USER_DATA_FILE)
func save_user():
.save(Globals.USER_DATA_FILE)
However, I get an error Parser Error: Error parsing expression, misplaced: '.' on line 7:
.load(Globals.USER_DATA_FILE)
If I comment that line out...
func load_user():
pass # .load(Globals.USER_DATA_FILE)
then the script parses fine, including the .save(…)
call, so I'm pretty sure this is something particular to the load
method.
Is this a bug that I should report, or am I doing something wrong?
Thanks,
- Johnson