so i was following the https://www.youtube.com/watch?v=rEYSi0ahC5Q&theme=dark
tutorial and when i finished typing the code for some reason the text wont render no matter how hard i tried the code is exactly the same and the logic is correct and the textbox renders and everything work but the text just wont render please help! heres the code:
create event:
"tbox_width = 19;
tbox_height = 3;
border = 8;
line_sep = 12; //this varibles is the length of vertical sepration between lines in diolouge
line_width = tbox_width - border*2; // this varible is about how many space for the text until to create a new line
tbox_spr = spr_textbox; //the sprite of the textbox
//text
page = 0; //the page of diolouge
page_number = 0; // the number of pages in diolouge
text[0] = "if this types correctly then I & we are GOLDEN"; // all of these arrays are text obvisouly
text[1] = "golden,golden,golden";
text[2] = "so...";
text[3] = "sp";
text[4] = "portable, looooooooooooooong";
text_length[0] = string_length(text[0]); // the length of the text array
dc = 0;//dc stands for (draw char)
ds = 0.1;//ds stands for (draw speed)
//this varible exists to see if the setup is done or not
setup = false;"
draw event:
"ack = keyboard_check_pressed(ord("E"));
tbox_x = camera_get_view_x(view_camera[0]) + 40; //the x position of the textbox based of the (view_camara[0]) + the x position of the textbox that we want
tbox_y = camera_get_view_y(view_camera[0]) + 570;
if (setup == false) {
setup = true;
draw_set_font(NES);
draw_set_valign(fa_top);
draw_set_halign(fa_left);
page_number = array_length(text);
for (var i = 0; i < page_number; i++) {
text_length[i] = string_length(text[i]);
}
}
if (dc < text_length[page]) {
dc += ds;
audio_play_sound(sound_blip,0,false);
dc = clamp(dc,0,text_length[page]);
}
if (ack) {
if (dc == text_length[page]) {
audio_stop_sound(sound_blip);
if (page < page_number-1) {
page++;
dc = 0;
}
else {
instance_destroy();
}
}
else if (dc < text_length[page]) {
dc = text_length[page];
audio_stop_sound(sound_blip);
}
}
if (dc == text_length[page]) {
audio_stop_sound(sound_blip);
}
draw_sprite_ext(tbox_spr,0,tbox_x ,tbox_y,tbox_width,tbox_height,0,c_white,1);
var _dtx = string_copy(text[page], 1, dc); // a local varible that helps to prints out the text from the text array from 1 to the dc
draw_text_ext(tbox_x + border,tbox_y + border,_dtx,line_sep,line_width);"