Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Introdile |
So I have code that looks like so:
export (Array) var skill_learn_id = []
var skill_list = []
func _ready():
for i in skill_learn_id:
skill_list.append(i)
skill_learn_id is set on the node in the editor, which just take integers.
However, when I try to do this, I get an error that says “Unable to iterate on object of type ‘Nil’”
I’m not entirely sure what’s causing this issue. I feel like it has to do with exporting the array, as it works just fine when I don’t (which is why there’s two arrays here, I used the second one as just a band-aid fix) but then I can’t have different ones for individuals. Any ideas how to get this to work?