ValueAtIndex

BlitzMax Forums/BlitzMax Beginners Area/ValueAtIndex

nawi(Posted 2006) [#1]
How is this command supposed to be working? I'm trying to return a random node, and it complains that it's unable to convert from Object to Node.

	Function GetNode:Node(TestNode:Node)
		Local LoopNode:Node
		Repeat
			LoopNode = NodeList.ValueAtIndex(Rand(0,NodeList.Count()-1))
		Until LoopNode <> TestNode
		Return LoopNode
	End Function



nawi(Posted 2006) [#2]
Ah, you need to use the "Node()" function. Nvm.