Thanks bloodline. I'm still very new to the engine SDK, so I don't know all functions yet. engine_getscript and engine_callscript.

You have a memory leak because you use str_create to create a string without removing it. str_create creates a string (which takes memory), and returns a pointer to that memory. You pass that pointer to a function, but unless the function removes the string (which is a bad idea because then it will always remove the strings you pass to it), the string will stay in memory but you have no way of accessing it because you lost the pointer.