Re: Calling functions of a mission via Lua
mail2345 wrote:
Err. GetActivity is a function.
Add some parens.
ActivityMan:GetActivity():[function]();
That should work.
Whoops, I did that, I just typed it in wrong in the OP.
Two other things that might affect this:
-I'm not trying to do functions like SetTeamFunds, I'm doing functions defined in the lua for the mission. Do I need to do something else to get the class for my mission? (E.G. Is the class returned by GetActivity() different than my mission's Lua class?)
-I am also doing this instead of directly doing GetActivity() each time: (Though I don't think it would matter...)
Code:
self.Activity = ActivityMan.GetActivity;
self.Activity:[function]();