[BUG] Variable XXXname clashes with a global variable of same name

Comments

1 comment

  • Adrian Nelson

    globalvar has been deprecated for a while from what I've read and I think you should use the "global." prefix as follows:

    function init(){
    global.BAG_TOOLS_QTY = array_create(10, -1);
    }

    function put_into_bag(place){
    global.BAG_TOOLS_QTY[place]++;
    }

    Hope that helps.

    0
    Comment actions Permalink

Please sign in to leave a comment.