Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 20:12:15 +0000



SCString failing as identifier

View Count: 606

[2016-09-29 17:44:20]
User94740 - Posts: 333
I have taken an extract from a custom study example and double checked according to the documentation, but after compiling I am getting an error to the following code.

Code
line 71: SCString Message;
line 72: Message.Format("Go to", ChartNumber);

Reported Error
C:\SierraChart-Trading\ACS_Source>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
TemplateTest20160927-1.cpp
C:\SierraChart-Trading\ACS_Source\TemplateTest20160927-1.cpp(72): error C2065: 'Message': undeclared identifier
C:\SierraChart-Trading\ACS_Source\TemplateTest20160927-1.cpp(72): error C2228: left of '.Format' must have class/struct/union
C:\SierraChart-Trading\ACS_Source\TemplateTest20160927-1.cpp(72): note: type is 'unknown-type'
C:\SierraChart-Trading\ACS_Source\TemplateTest20160927-1.cpp(74): error C2065: 'Message': undeclared identifier
Date Time Of Last Edit: 2016-09-29 17:45:14
[2016-09-29 18:20:31]
Sierra Chart Engineering - Posts: 104368
For the proper format for a source code file, refer to step 17 here:
http://www.sierrachart.com/index.php?page=doc/AdvancedCustomStudyInterfaceAndLanguage.php#StepByStepInstructions

Also this line is wrong:

Message.Format("Go to", ChartNumber);

It should be:

Message.Format("Go to %d", ChartNumber);
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account