📜  gms2 init 空数组 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:55.702000             🧑  作者: Mango

代码示例1
// Create an empty array using a script

// in the script
function EmptyArray1(arrLength) constructor { // Create new 1d array
    arr = {};
    for(var i=arrLength-1;i>0;i--) {
        arr[i] = -1; // Your value you want to fill the array with
    }
}

// where you want to create the array
var array = createEmptyArray(length);