This question relates to the lua c api. Lets say i have a file like this one:
helloString = "Hello World" function fwrite (fmt, ...) return io.write(string.format(fmt, unpack(arg))) end
And i want to load it into a global table named loadedScript such that at a later point i can call fwrite like loadedScript.fwrite
Ideally i would like to load the file and assign it's contents to the global table trough the C API.
I'm new to lua, and have no idea what to even look for to solve this.
Anyone have any ideas?