Skip to content

ScriptFunctionWrapper

Hyomoto edited this page Jun 24, 2021 · 1 revision
Jump To Go Back Arguments Methods Variables

ScriptFunctionWrapper( script_function )

Implements: Struct

When FAST_SCRIPT_PROTECT_FUNCTIONS is true, fscript will reject function calls if they are not wrapper in ScriptFunctionWrapper. This struct marks them as safe-for-execution. This is to prevent malicious code injection via external scripts and modding and allows the script engine to be properly sandboxed.

var _scope = {
  print: new SafeScript( show_debug_message )
}
script.execute( _scope );
Output: `print` would be usable as a function alias for show_debug_message in the executed script

Arguments

Name Type Purpose
script_function int A GMS script function

Methods

Jump To top toString

toString( )

Name Type Purpose
None

No description.


Variables

Jump To top
Name Type Initial Purpose
__Value undef _value No description.
Clone this wiki locally