Hey, im doing an assignment that requires to make a vending machine :eek: yeah, its all over here.
However can anyone tell me whats wrong with this code?
purchase = if price <= money Then
money = money - price
Else
If price >= money Then
TextBox1.Text = "Sorry! Not Enough Money!"
End If
'Fixing the money going into the minuses'
If money <= -1 Then
money = old_money
End If
I get an error with the first if, it says 'expression expected' havnt i dont that?
it also gives me an error with the Else, it says it needs a matching if.
thanks for any help