Jump to content

Help with calling a variable function


Recommended Posts

So here's what I'm trying to do.

 

I have function a, function b, function c

 

I have a string named dofunction

 

I want to do this

 

dofunction = "a"

CallFunction(dofunction)

(runs function a)

 

dofunction = "b"

CallFunction(dofunction)

(runs function b)

 

is this possible? It would be easier to do this then

if dofunction == a

a()

elseif == b ...etc..

dofunction = "a"

CallFunction(dofunction)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...