Deltarune script viewer

← back to main script listing

gml_GlobalScript_scr_84_pop

(view raw script w/o annotations or w/e)
1
function scr_84_pop
scr_84_pop

function scr_84_pop() { if (!variable_global_exists("chemg_stack")) { global.chemg_stack = array_create(0); global.chemg_stack[0] = 0; } var top_ndx = global.chemg_stack[0]; if (top_ndx <= 0) show_error("stack empty", true); global.chemg_stack[0] = top_ndx - 1; return global.chemg_stack[top_ndx]; }
()
2
{
3
    if (!variable_global_exists("chemg_stack"))
4
    {
5
        global.chemg_stack = array_create(0);
6
        global.chemg_stack[0] = 0;
7
    }
8
    var top_ndx = global.chemg_stack[0];
9
    if (top_ndx <= 0)
10
        show_error("stack empty", true);
11
    global.chemg_stack[0] = top_ndx - 1;
12
    return global.chemg_stack[top_ndx];
13
}