It seems I've located the problem and it is related to arrays and/or UDTs, but in the weirdest way.
When I use:
For i=1 to 2
For a=1 to Weapon[i].Bullets
Print(Str(i)+", "+Str(a)+": "+Str(Ammo[i,a].Active))
Next a
Next i
, everything is fine. It's NOT fine without that print.
Even if I use:
For i=1 to 2
For a=1 to Weapon[i].Bullets
Print(Str(a)+": "+Str(Ammo[i,a].Active))
Next a
Next i
(without printing "i" variable), it's bugged (crashes, etc).
I've attached a screenshot. Note that array indices are ok and all the "Ammo[i,a].Active" are set to 0 before this.
[edit] Yeah, I am planning to buy the full version, but I'm broke atm, so I was going to finish this game while searching for money. It's not expensive, though, I might be able to dig up 60$, but summer is coming and I have bad summer-spending-drinking-parting habits