Last active
January 28, 2025 02:00
-
-
Save tinkerer-red/9ed172f0db46df862f0b667b9d27da72 to your computer and use it in GitHub Desktop.
constructor_call() / constructor_call_ext()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function constructor_call(ind) { | |
static __arr = []; | |
var _i=1; repeat(argument_count-1) { | |
__arr = argument[_i]; | |
_i++} | |
var _struct = constructor_call_ext(ind, __arr); | |
array_resize(__arr, 0) | |
return _struct; | |
} | |
function constructor_call_ext(ind, array, offset=0, num_args=array_length(array)-offset) { | |
var _struct = {}; | |
with( _struct ) script_execute_ext(ind, array, offset, num_args); | |
static_set(_struct, static_get(ind)) | |
return _struct | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment