Posted 06 August 2013 - 09:42 AM
Hello pro's,
I am part of a mapmaking team which, obviously, makes a map based around computercraft. After we playtested some of the code we realised that there might be people who wanted to turn off special features or even add some of there own.
To achieve this we want to implement a API Based plugin system. But we ran into a problem. We are able to load all the plugins as API's by calling a for-loop on a table returned by fs.list("Plugins"). But we donnot know how to call the functions in those API's cause we donnot know there name directly so somelike userAPI.callFunction is not possible.
Is there a way to still call the functions if you only have the name of the API in string form stored in the table that we used to register the API's?
Greets,
Marczone3
I am part of a mapmaking team which, obviously, makes a map based around computercraft. After we playtested some of the code we realised that there might be people who wanted to turn off special features or even add some of there own.
To achieve this we want to implement a API Based plugin system. But we ran into a problem. We are able to load all the plugins as API's by calling a for-loop on a table returned by fs.list("Plugins"). But we donnot know how to call the functions in those API's cause we donnot know there name directly so somelike userAPI.callFunction is not possible.
Is there a way to still call the functions if you only have the name of the API in string form stored in the table that we used to register the API's?
Greets,
Marczone3