GML:
// this is the npc index. Ex. 0 is sam, 1 is Rachel etc..
var n = 0;
// text that pops on textbox
npc[n,story[0]] = "Hi" ;
npc[n,story[1]] = "My name is Sam" ;
npc[n,story[2]] = "How are you?" ;
npc[n,story[3]] = "That's good." ;
//choices below the text
npc[n,choice[0,0]] = "Hello" ;
npc[n,choice[0,1]] = "Hi" ;
npc[n,choice[1,0]] = "Good to know" ;
npc[n,choice[1,1]] = "" ;
npc[n,choice[2,0]] = "I'm quite ok" ;
npc[n,choice[2,1]] = "Not so good" ;
npc[n,choice[3,0]] = "Exit" ;
npc[n,choice[3,1]] = "" ;
// move to next story(text), -2 for closing textbox
npc[n,path[0,0]] = 1;
npc[n,path[0,1]] = 1;
npc[n,path[1,0]] = 2;
npc[n,path[1,1]] = 2;
npc[n,path[2,0]] = 3;
npc[n,path[2,1]] = 3;
npc[n,path[3,0]] = -2;
npc[n,path[3,1]] = -2;
trying to index a variable which is not an array
at gml_Object_obj_npc_CreateEvent_1 (line 9) - npc[n,story[0]] = "Hi"
I thought I'm allowed to use arrays inside arrays?
why am i getting this error? also would this be the best way to implement textbox system ?