B
Bladebss
Guest
ok, so, im a bit confused about the use of parentheses at the end of scripts. some times if I don't have the parentheses the script wont run and some times if I do have them the script wont run?
if the script has arguments and I put them in the parentheses, as is necessary, the script runs fine if its written like that in say, the step event. but if I have a data structure with the script as one of the values in the structure, if I use parentheses at the end the script doesn't work, and if there are arguments I need in the parentheses, it just reads 0 in the show_debug_messsage(), if I add the arguments and parentheses it runs the first script in the list of scripts in the resource list and not the script in the grid? (all other entries in the grid are present and correct though the debug message for sprites in the grid return a number?)
im using execute_script(ds_grid_get,id,x,y), to call the script in the grid and the script in the grid is set using
ds_grid_set(id,x,y,myscript(arguments)) is this wrong? am I trying to do something that's not possible or using the wrong tools for the job?
I cant find the rules for parentheses and scripts any where, or when to use them and when not to.
whats going on here and how can I fix it so I can run the script in the grid using the argument defined in the grid?
if the script has arguments and I put them in the parentheses, as is necessary, the script runs fine if its written like that in say, the step event. but if I have a data structure with the script as one of the values in the structure, if I use parentheses at the end the script doesn't work, and if there are arguments I need in the parentheses, it just reads 0 in the show_debug_messsage(), if I add the arguments and parentheses it runs the first script in the list of scripts in the resource list and not the script in the grid? (all other entries in the grid are present and correct though the debug message for sprites in the grid return a number?)
im using execute_script(ds_grid_get,id,x,y), to call the script in the grid and the script in the grid is set using
ds_grid_set(id,x,y,myscript(arguments)) is this wrong? am I trying to do something that's not possible or using the wrong tools for the job?
I cant find the rules for parentheses and scripts any where, or when to use them and when not to.
whats going on here and how can I fix it so I can run the script in the grid using the argument defined in the grid?