Posted 19 October 2017 - 10:17 AM
I want to write a program that can run with or without an api.
Whenever i run it without the api loaded, i get an error at the first function call.
If i wanted to do this with some variable, i would do something like this:
i was thinking maybe a second API that gives function pointers, but then that would have the same problem.
Whenever i run it without the api loaded, i get an error at the first function call.
If i wanted to do this with some variable, i would do something like this:
function do_something(var)
if not var then
--do it without var
else
--use var
end
end
Is there a way for me to do this with an API function that may or may not be loaded?i was thinking maybe a second API that gives function pointers, but then that would have the same problem.
Edited on 19 October 2017 - 09:06 AM