View Single Post
11-24-18, 01:56 AM   #4
bonksnp
A Murloc Raider
Join Date: Nov 2018
Posts: 4
Originally Posted by myrroddin View Post
You never defined constructor as file scope, so it doesn't exist on line 208. I think you meant to type either self.constructor or framesConstructor. I didn't really pay enough attention to make sure which one to use, sorry.

Also, table.getn was depreciated a few years ago. use # instead, like
Code:
local table_length = #MyTable
I didn't know about table.getn, thanks!

The intent by using allFrames instead of framesConstructer was to simulate object oriented programming.


I wanted to do this with
Code:
	allFrames[#allFrames + 1] = framesConstructor:create("runicpower", 120, 16, setupRpower, updateRpower)
	allFrames[#allFrames + 1] = framesConstructor:create("runes", 120, 12, setupRunes, updateRunes)
	allFrames[#allFrames + 1] = framesConstructor:create("diseases", 64, 64, setupDis, updateDis)
The idea was to have each index in allFrames contain an 'object' that could be referenced back to. Sort of like object.constructor(), but instead of object it's just allFrames[i] (in the for loops).
  Reply With Quote