Hi,
this is my code:
function Start(){
windowRect=Rect(Screen.width-windowSize.x,Screen.height-40-windowSize.y,windowSize.x,windowSize.y);
for(var i : int = 0; i < numInv; i++){
associatedInventory*=GetComponent(Inventory);*
print(i);
}
}
When i run the scene in console doesn’t is show the variable i.
Why?
greetings Samusam
Most likely because the variable numInv is 0, so the loop executes 0 times. It could also be because the line before throws an exception, aborting the execution before it has a chance to print i.
– CHPedersen