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.

erm...like this?


player(1)\lives = reset_life()
.
.
.
function reset_life%()
Return 0
end function



or like this:

reset_lives(player(1))
.
.
.
Function reset_lives(player.playertype)

player\lives = 0

End function


Maybe I'm not understanding exactly what you are trying to do?

but per your example, this wouldn't work either:

A% = 1

Print A

increase_variable(A)

Print A


Function increase_variable(param)

param = param + 1

End function