Function->Type..?

BlitzMax Forums/BlitzMax Beginners Area/Function->Type..?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

even without this typo, the function is pointless and wrong.

Either you wanted that:

Function cTextfield:tTxtBox( x%, y%, width%, height%)
  Local result:tTxtbox=New tTxtBox
  result.x=x
  result.y=y
  Return result
End Function


which does not take the name as it is not needed.

or you wanted that:
Function cTextfield( x%, y%, width%, height%, var name:tTxtBox)
  name=New tTxtBox
  name.x=x
  name.y=y
End Function



I strongly suggestion to look for assaris tutorials and learn how to use the documentation before proceeding further and trying to get anything done, you sadly lack the pure basics of type declaration which means you won't be able to do anything as this is the total "minimum" knowledge beside basic branching and looping knowledge