ok, so field.as contains a field class, which contains a method that calls a method from another class (in another file.)
field.as
...
find_path.findPath(start_node, end_node, findConnectedNodes ) // I am getting the error here
...
find_path.as has a method called findPath.
public static function findPath(firstNode:Node, destinationNode:Node, connectedNodeFunction:Function ):Array{
....
the error I’m getting (getting the same error twice):
-1118: Implicit coercion of a value with static type Object to a possibly unrelated type Node.
-1118: Implicit coercion of a value with static type Object to a possibly unrelated type Node.
You might not have declared the type of
start_nodeandend_node.Declare those variables as
Alternatively, call the function as