This is a job for big brains, mine is smooth so that is why me is ask for the big helps.
Heres the walkthrough
I get a script name and arguments for that script like so
[scr_scriptname] [argument_array_here]
The first set of brackets hold the script name in a string that is converted to the asset name that is called in the script_execute function.
The second set of brackets is a makeshift array that is converted to a real array, and looks like so
String: (argument1,argument2,argument3) -> GML:
ISSUE 1:
I will not know how long the argument array is
Solution 1:
I can check the arrays length and return a number for how long it is and use it as how many arguments to add to the function, for example sake lets say 3
ISSUE2:
I wont know anything about the script to be ran besides its name.
MAIN ISSUE:
How do I write:
the way I see it the array needs to be broken into variables, but like i said I can only get how many there are and what each is
Then I need to have the function be called with the arguments broken up between , to make the function work , I can not write a switch statement for every length of arguments there could be for a script being given.
So im looking for a way to have the arguments array be unpacked and put into the function like so
Heres the walkthrough
I get a script name and arguments for that script like so
[scr_scriptname] [argument_array_here]
The first set of brackets hold the script name in a string that is converted to the asset name that is called in the script_execute function.
The second set of brackets is a makeshift array that is converted to a real array, and looks like so
String: (argument1,argument2,argument3) -> GML:
arugs_array = [argument1,argument2];
ISSUE 1:
I will not know how long the argument array is
Solution 1:
I can check the arrays length and return a number for how long it is and use it as how many arguments to add to the function, for example sake lets say 3
ISSUE2:
I wont know anything about the script to be ran besides its name.
MAIN ISSUE:
How do I write:
Script_execute( script_name, [ARGUMENTS HERE FOR THE SCRIPT] )
the way I see it the array needs to be broken into variables, but like i said I can only get how many there are and what each is
Then I need to have the function be called with the arguments broken up between , to make the function work , I can not write a switch statement for every length of arguments there could be for a script being given.
So im looking for a way to have the arguments array be unpacked and put into the function like so
GML:
arugs_array = [arg_1, arg_2, arg_3];
vvvvvvvvvvv
script_execute( scr_pineapples, arg_1, arg_2, arg_3);
Last edited: