Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator fails to compile with code 'CS103 - variable not declared'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    indicator fails to compile with code 'CS103 - variable not declared'

    the attached indicator fails to compile with error 'the name 'PlotHAO' does not exist in the current context' and code 'CS103 - variable not declared'. I have unsuccessfully spent hours trying in various ways to research and fix the error. backups I made within NT failed to work with an error something like 'restoration would corrupt the system'. Any help will be much appreciated. the file for the indicator code is attached. the offending line of code at line 47 is "
    PlotHAO.Set(((PlotHAO[
    1]+joeHACindicator3(1)[1])/2));"joeHAOindicator.cs

    #2
    Problem resolved by myself

    I failed to notice in the error message that the error was occurring in a different indicator than the indicator being compiled. That is, the code in another newly created indicator that is almost identical in name and code to the one being compiled was the indicator with the problem. everything works ok now that I have gone to the new indicator and fixed the problem there.

    Comment


      #3
      Originally posted by joemiller View Post
      I failed to notice in the error message that the error was occurring in a different indicator than the indicator being compiled. That is, the code in another newly created indicator that is almost identical in name and code to the one being compiled was the indicator with the problem. everything works ok now that I have gone to the new indicator and fixed the problem there.
      Yep - all code must compile in <=NT7...

      From what I saw in NT8 pre-video - this will NOT be case (UNLESS of course, the code depends on the bad code, independent scripts that fail to compile won't matter)...

      Comment


        #4
        I like the feature, now that I am aware of it.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        345 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        558 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X