- Edited
Hello,
I'm trying to implement a simple linked list and I'm getting a "cyclic dependency" error. Though, it seems to work fine if I omit the pointer type (normally I try to type all my stuff where possible). Just wondering if it's just a parse-level error and gd script won't do anything funny down the line.
My node class is pretty simple:
class_name DialogNode
var speaker:int;
var text:String;
#var next:DialogNode; # it does not like this...
var next; # but it seems fine with this
func _init(inputSpeaker:int, inputText:String):
speaker = inputSpeaker;
text = inputText;
next = null;
func _to_string() -> String:
return "DialogNode -> "+ str(speaker) +" : " + text;