Support Board
Date/Time: Tue, 21 Jan 2025 00:51:43 +0000
Post From: SCInputRef variable question...
[2018-07-02 16:30:32] |
User895355 - Posts: 55 |
Basically, I want to increment MyVar by 1 each time "myCondition" is met. Works fine, except when I reload/recalculate the chart, MyVar does NOT reset to 0, keeps its value, and increments every time I reload/recalculate the chart. What am I missing here? I have this: SCInputRef MyVar = sc.Input[0]; if (sc.SetDefaults) { sc.AutoLoop = 1; MyVar.SetInt(0); return; } if (myCondition) { MyVar.SetInt(MyVar.GetInt() + 1); } |