Hi Everyone I am new to B4A and am new to this coding language. I need some help with an app I am making which sets four peoples scores, and then you can deduct points from their scores individually. I would also like to have a button which sets the initial score, and one to reset activity to zero. This is a complicated first project and would appreciate some help. I know there are many errors in this, I am looking for some constructive feed back to tell me what im doing wrong and where to go next. Please Have a look at my coding and feel free to change what you want to get it to work. I hope the community is as helpful as it seems!
Thanks for your time.:sign0188:
I am having problems with the calculations part. I need to take values from the spinners and use them to calculate the amount of points deducted and the new total score value for that player. Also I need to be able to edit each players score individually. I know this code is wrong and I tried many many different ways, but none are working for me. I would appreciate some advice.
Thanks Erel
here is the part of code which doesnt work for me.
Sub Calculate
If Not (IsNumber(editPoints.Text)) Then
editPoints.Text = "0.0"
End If
If labelplayer1=1
labelplayer1=labelplayer1-editPoints.Text
If playerNum = 2
labelplayer2=labelplayer2-editPoints.Text
If playerNum = 3
labelplayer3=labelplayer3-editPoints.Text
If playerNum = 4
labelplayer4=labelplayer4-editPoints.Text
End Sub
playerNum is Spinner
labelplayer() is the player Number
And editPoints is the score to deduct
initialpoints in Spinner which sets initial point values
Thank you VERY much Mangojack. Ive been at this all week, ive figured most the coding out myself and fixed a lot since that last post. However your post was very informative. It helped me figure out what im doing, now i got to get to work using that code and working it into my app. Thanks for the help, I couldn't have asked for more. For now I am a very happy man!
Hey Mangojack
I just finished my app! Its working and running very well. No better feeling than that! I would like to thank you again for your support. I am going to continue learning b4a after this experience, I am motivated to make more applications. Haha, once I learn the lingo I hope to help others on these awesome forums. See you later!