ValueAtIndex

BlitzMax Forums/BlitzMax Beginners Area/ValueAtIndex

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

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


Ah, you need to use the "Node()" function. Nvm.