Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_item

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

function scr_item(argument0) //gml_Script_scr_item { nm = argument0 var i = 1 while (i <= 8) { if (global.item_slot[i] == "Nothing") { global.item_slot[i] = nm return true; } else { if (i == 8) return false; i++ continue } } }
(argument0) //gml_Script_scr_item
2
{
3
    nm = argument0
4
    var i = 1
5
    while (i <= 8)
6
    {
7
        if (global.item_slot[i] == "Nothing")
8
        {
9
            global.item_slot[i] = nm
10
            return true;
11
        }
12
        else
13
        {
14
            if (i == 8)
15
                return false;
16
            i++
17
            continue
18
        }
19
    }
20
}