Game_Re_creation_Project
Member
For some reason when I use arguments with [] in this GML script, I get a an error message saying "Script: scr_check_proper_keywords at line 1 : no references to argument 0 but references arguments 1,2,3,4,5,6,7,8"
However, when I use argument0 (the built-in constant) it works.
Here is my current script, it is designed to acquire ds_list values from another script.
However, when I use argument0 (the built-in constant) it works.
Here is my current script, it is designed to acquire ds_list values from another script.
Code:
/// @function scr_check_proper_keywords( keyword_is_seen, keyword_is_used, proper_keyword_ds_list, not_used_string, counter, display_error_message, TEXT_POSITION_STRING, TEXT_POSITION_VALUE, text)
/// @description Checks the Keyword value and updates keyword ds_list in draw_text_using_markup scripts
/// @param {real} keyword_is_seen whether the keyword was seen
/// @param {bool} keyword_is_used whether the keyword had already been used
/// @param {real} proper_keyword_ds_list The proper keyword ds list in the script
/// @param {string} not_used_string specific string for if a keyword is not used
/// @param {real} counter The instance for whent eh keyword was seen
/// @param {bool} display_error_message to display the error message
/// @param {real} TEXT_POSITION_STRING Denotes position in ds list where current string is located
/// @param {real} TEXT_POSITION_VALUE Denotes position in ds list where current value is located
/// @param {string} text The text to inset into ds_list
if (argument0) /*<------If I were to use "argument[0]" here and use [] for the other arguments, GMS displays an error*/
{
//if text value used is false and value is found in ds_list and instance value is -1
if (!argument1
&& argument2[| argument6] == argument3
&& argument2[| argument7] == -1)
{
//set to true
argument1 = true;
//increment proper keyword counter
argument4++;
//add values to ds_list
ds_list_replace(argument2,argument6,argument8);
ds_list_replace(argument2,argument7,argument4);
}
//This text value has already been declared for this textbox! Throw an error
else {argument5 = true;}
}