Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem with syntax in VSCode

Engaged ,
Jan 11, 2025 Jan 11, 2025

In Visual Studio Code in the jsx file on all lines where #include is used, it gives a problem and suggests using ‘;’ at the end of the line.

What is causing this to happen?

 

Untitled-1.pngexpand image

TOPICS
Scripting
293
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 12, 2025 Jan 12, 2025

Writing `//@include` instead of `#include` will prevent the error.

//@include '../Test/test-1.jsx'

main() ;

function main() {
  // do something
}
Translate
Adobe
Community Expert ,
Jan 12, 2025 Jan 12, 2025

Writing `//@include` instead of `#include` will prevent the error.

//@include '../Test/test-1.jsx'

main() ;

function main() {
  // do something
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 12, 2025 Jan 12, 2025

Well, commenting on a line is clearly not a solution to the problem...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2025 Jan 12, 2025

Have you actually tried this method? The code will be imported. Or is it not your goal to avoid errors and include the code?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 12, 2025 Jan 12, 2025
LATEST

Indeed, I didn't immediately notice that you used the @ symbol, and it works. But the disadvantage of this method is that visually the commented line blends in with the rest of the comments. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines