account = {
balance = 10;
Withdraw = function(self,v)
if v < account.balance then
self.balance = self.balance - v
print(account.balance)
end
end
}
account:Withdraw(5)
account = {
balance = 10;
Withdraw = function(self,v)
if v < account.balance then
account.balance = account.balance - v
print(account.balance)
end
end
}
account:Withdraw(5)
Why does the top one work, but not the bottom one?

1 comment
cuz your taking away the - v Balance you've made a function called self,v so your removing the self,v function then it cant o