Login Page - Create Account

Support Board


Date/Time: Fri, 28 Aug 2026 02:30:01 +0000



Post From: SCString .Format() and .AppendFormat() causing SC to crash

[2026-08-28 01:18:36]
User719512 - Posts: 470
Did you ask AI like Grok or ChatGPT for guidance? This should not take a few days to solve. This is a common pitfall we have all seen, forgotten, mistyped, etc.

The % after 80 is a format specifier, not a literal percent. Crashes happen when one forgets to escape %.

Escape it as %%:


StudyStr.Format("\nNLV: $%.2f | ", CurrNLV);
StudyStr.AppendFormat(" 80%% NLV: %.2f (%.2f)", Limit_NLV80Pct, CurrMargin / Limit_NLV80Pct);

or keep it in one call:


StudyStr.Format("\nNLV: $%.2f | 80%% NLV: %.2f (%.2f)", CurrNLV, Limit_NLV80Pct, CurrMargin / Limit_NLV80Pct);