Lostania
Lostania

Reputation: 145

Any way to access an instance variable from inside a simple function in Lua?

How to create a "pseudo-instance" variable or access an instance variable from a simple function defined inside a class in Lua ?

I did'nt find any way to access an instance variable from a simple function inside a class. I can only access it if the function is a method i.e. with the prefix of the class before ( anyClass:method() ) usinf "self." keyword. Thanks ;)

Upvotes: 1

Views: 288

Answers (0)

Related Questions