passing a type variable to a function

Blitz3D Forums/Blitz3D Beginners Area/passing a type variable to a function

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.

here's what I'm trying to do.

Type playerdata
Field speed
Field strength
End Type

Dim player.playerdata(4)

player.playedate(1) = New playerdata
player.playedate(2) = New playerdata

player(1)\strength=1
player(2)\strength=7

increment_lives ( player(1)\strength )
increment_lives ( player(2)\strength )

;------------------------

Function increment_lives ( somethinghere )

somethinghere = somethinghere + 1
eg. player(1)\strength = player(1)\strength + 1

End Function

;-------------------------

I want the function to take whatever type variable I pass it and increment it.