Wondering if you can have functions like;

function Start()
	--do stuff here
end

in side of dictionaries. So when you access that definition, it calls the function. If this is possible, what all is possible by doing this?

7 comments

0

Yes, that's how the math, string, table, etc libraries work.

0

How would I place a function inside of one then? I am unsure of how to properly do it.

0

Table[Key] = Func would be one example.

0

I tried that,

0

I guess my real question is, how would I call the function then?

0

simply say Start() nothing more nothing less.... function thing() end thing()

0

Right but I would want to call only the function of the table[Key], lets say I have 2 keys with 2 different functions. I want to call the 1st one.