Hi, i am just woundering if anyone can help me i am working in VB6.
i am wanting to store a number like pounds in a integer and then lets say the player wishes to buy somthing like a oven that costs £599 and as 1000 starting money this is the code but its not working does anyone know why.
General Decorations
VB Code:
'Integer that Stores record of the players money Dim intmoney As Integer
VB Code:
Private Sub Form_Load() 'This sets the players money to 1000 for starting money when the form loads intmoney = 1000 end subVB Code:
Private Sub oven2_Click() If intmoney >= 599 Then lockOven2.Visible = False intmoney = -599 Label4.Caption = "You Bought The New Item" If intmoney < 599 Then Label4.Caption = "Sorry But You Can Not Afford This Item" End Sub
by the way lockOven2 is a label that is covering and hiding the second oven gaphic so with that not visible you second oven will be.
sorry if this is a bit of an low level vb question
thanks in advance
pipwilky



Reply With Quote
so many posts in one go!
icon on the left of the post.
