Execute string

Explanation
This function is used to execute a piece of code that is not known at design time. It executes the piece of code in the string str with the indicated arguments.

Arguments
While executing string, values of global variables argument0-argument14 are set to corresponding values arg0-arg14. There can be up to 15 arguments to a piece of code due to Game Maker Restrictions to have 16 arguments on function calls.

Variable Scope
Temporary variables defined in outer piece of code are undefined while executing a string. Only variables, declared in str with var statement can be accessed. Of course, global and local variables are accessible.

Return and Exit
If there are a return statement in piece of code, then function execute_string returns a value indicated in it. If piece of code is terminated with exit statement or just by reaching its end, the function returns 0.