View Single Post
10-13-17, 03:58 PM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Your metatable is fine, what's not fine is that pairs supplies your iterator for you. You don't set it yourself.
Lua Code:
  1. function ClassTest:CheckTab()
  2.    for i, stat in pairs(self.tab) do
  3.       -- Do something
  4.    end
  5. end
__________________

Last edited by MunkDev : 10-14-17 at 10:28 AM.
  Reply With Quote