Problem with types

Blitz3D Forums/Blitz3D Beginners Area/Problem with types

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.

"If you're gonna hardcode the players like that anyway, why not just make an array of the players?"

This isn't my real program, i just wrote it to show an example of my problem. In my real program I won't know how many type objects that will be created.


"The variable count will start at 0 so you will need to use PlayerHealth(1) to get player 2's data."

It doesn't work. PlayerHealth(1) returns 100 (which is player 1's health, as the function is supposed to return)
But I can't get player 2's health.