I am trying to keep a running score in my applicationwith the following coding:
PlayerScore is how many points the players has got.
lblPlayerPoints is where the PlayerScore is shown
PScoreIndex is set so that it chooses the next lblPlayer number when a new card is displayed and a new value shown
However the (lblPlayer( text is giving me the following error.
Does anyone have any ideas. Do i need some kind of declaration?
VB.NET:
PlayerScore = CInt(Val(lblPlayerPoints.Text))
PlayerScore = PlayerScore + CInt(Val(lblPlayer(PScoreIndex).Text))
PScoreIndex += 1
PlayerScore is how many points the players has got.
lblPlayerPoints is where the PlayerScore is shown
PScoreIndex is set so that it chooses the next lblPlayer number when a new card is displayed and a new value shown
However the (lblPlayer( text is giving me the following error.
Error 1 Class 'System.Windows.Forms.Label' cannot be indexed because it has no default property.
Does anyone have any ideas. Do i need some kind of declaration?