Hello,
when do you call your "intializeCareerIndices()" function?
I created a global variable "Test=15" in an event sheet and call this code and it returns 15 as it should do:
async function OnBeforeProjectStart(runtime)
{
runtime.addEventListener("tick", () => Tick(runtime));
var careerIndices = [];
for (var i = 0; i < runtime.globalVars.Test; i++) {
careerIndices.push(i);
}
console.log(careerIndices.length);
}