Matthew Soule
Member
Hi,
I have searched within the community for the answer to no avail, it just hasn't been clear to me. I'm building a quote trivia game with 1600 questions yet the error keeps flagging the 66th question within a ds list.
global.question[66] = "I am afraid I am a constant disappointment to my party. The fact of the matter is, the longer I am president the less of a party man I seem to become."
global.option1[66] = "William Taft"
global.option2[66] = "Benjamin Harris"
global.option3[66] = "Warren Harding"
global.option4[66] = "William Clinton"
global.hint[66] = "US Presidents - The 27th president of the United States."
global.answer[66] = 1 //correct answer;
------------------------------------------------------------------------------------------------
The error:
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object obj_add_from_code:
Push :: Execution Error - Variable Index [0,66] out of range [1,66] - -5.question(100005,66)
at gml_Object_obj_add_from_code_Create_0 (line 530) - global.question[66] = "I am afraid I am a constant disappointment to my party. The fact of the matter is, the longer I am president the less of a party man I seem to become."
############################################################################################
stack frame is
gml_Object_obj_add_from_code_Create_0 (line 530)
called from - gml_Object_obj_from_code_Mouse_4 (line 3) - instance_create_layer(x,y,"instances",obj_add_from_code);
------------------------------------------------------------------------------------------------------------------------------------------------------
Create Event:
The top of my ds list:
global.current_question=1
global.number_of_questions=1600;
global.correct=0;
----------------------------------------------------------------------
Bottom of my ds list:
/// The list and shuffle
global.quote_list=ds_list_create();
for (var i=1; i< global.number_of_questions; i+=1)
{
ds_list_add(global.quote_list,i);
}
ds_list_shuffle(global.quote_list);
room_goto(room_quiz);
****Also, when a quiz game such as this is published, are the questions automatically randomized with each play of the game?
Thank you in advance.
Matt
I have searched within the community for the answer to no avail, it just hasn't been clear to me. I'm building a quote trivia game with 1600 questions yet the error keeps flagging the 66th question within a ds list.
global.question[66] = "I am afraid I am a constant disappointment to my party. The fact of the matter is, the longer I am president the less of a party man I seem to become."
global.option1[66] = "William Taft"
global.option2[66] = "Benjamin Harris"
global.option3[66] = "Warren Harding"
global.option4[66] = "William Clinton"
global.hint[66] = "US Presidents - The 27th president of the United States."
global.answer[66] = 1 //correct answer;
------------------------------------------------------------------------------------------------
The error:
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object obj_add_from_code:
Push :: Execution Error - Variable Index [0,66] out of range [1,66] - -5.question(100005,66)
at gml_Object_obj_add_from_code_Create_0 (line 530) - global.question[66] = "I am afraid I am a constant disappointment to my party. The fact of the matter is, the longer I am president the less of a party man I seem to become."
############################################################################################
stack frame is
gml_Object_obj_add_from_code_Create_0 (line 530)
called from - gml_Object_obj_from_code_Mouse_4 (line 3) - instance_create_layer(x,y,"instances",obj_add_from_code);
------------------------------------------------------------------------------------------------------------------------------------------------------
Create Event:
The top of my ds list:
global.current_question=1
global.number_of_questions=1600;
global.correct=0;
----------------------------------------------------------------------
Bottom of my ds list:
/// The list and shuffle
global.quote_list=ds_list_create();
for (var i=1; i< global.number_of_questions; i+=1)
{
ds_list_add(global.quote_list,i);
}
ds_list_shuffle(global.quote_list);
room_goto(room_quiz);
****Also, when a quiz game such as this is published, are the questions automatically randomized with each play of the game?
Thank you in advance.
Matt