Question - Code Any way to add semicolons automatically?

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Nodamex, Nov 21, 2018.

  1. Nodamex

    Nodamex Member

    Joined:
    Jul 14, 2016
    Posts:
    17
    Is there any way to add semicolons properly for 80.000 lines of GML code for using YYC? I can predict that it will be hard, but may be some of you offer me a solution that makes it a little bit easier.
     
  2. csanyk

    csanyk Member

    Joined:
    Jun 20, 2016
    Posts:
    812
    Short of writing a program that can parse your GML out and add them, I don't think so. It'd be kinda tough to write it unless you're very familiar with string manipulation AND GML syntax rules.

    But this makes me think: One thing that would be pretty awesome would be a config option in the code editor to treat missing semi-colons as a syntax warning, and highlight the missing space where they belong.
     
    Justice likes this.
  3. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,188
    Search for "var" and make sure you have semicolons on all those lines. The rest probably won't matter but those absolutely can cause strange things.
     
  4. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    1,995
    As of the current versions, semicolons shouldn't matter for YYC - you can verify by comparing a .cpp file generated for GML file with semicolons versus one for a GML file without any
     
  5. Marcus12321

    Marcus12321 Member

    Joined:
    Aug 29, 2018
    Posts:
    90
    Open in a text program, do a find/replace for the CR/LF character?!?!

    Just a suggestion, might get you close.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice