#invalid get index 'character_select_scene` (on base: 'Nil')

4 messages · Page 1 of 1 (latest)

jagged sedge
#

I have 3 scenes, called
"res://scenes/characters/character_select_1.tscn"
"res://scenes/characters/character_select_2.tscn"
"res://scenes/characters/character_select_3.tscn"

along with them i have a script called "game.gd" in which there is a value of "characterscreen" that keeps track of which scene should be displayed. I then made a script called "GameState" with `@export var character_select_scene = "res://scenes/characters/character_select_1.tscn".
The issue here is, when I press the start button in my title screen, instead of it loading one of the character_select scenes, it throws me the "invalid get index 'character_select_scene' (on base: 'Nil')" error, does anyone have any ideas of what might cause this? If there's anything else I should mention please let me know and ill provide the appropriate info

earnest tartan
#

have you solved it yet?

rustic harbor
#

Could we see the code of that?

#

It looks like you haven't declared the variable