Lua script throws error “attempt to call a nil value (field 'deposit')”
snippet in lua

Lua script throws error “attempt to call a nil value (field 'deposit')”

user3035

new_account = Account:new()
print(new_account.balance)
new_account:deposit(23)
new_account:deposit(1)
print(new_account.balance)