HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Text macros run after vJass

11-28-2007, 06:07 PM#1
Strilanc
*EDIT* My problem was caused by a more serious problem.

Text macros are ignored if they come at the end of a line of real code.

Collapse JASS:
  set i = 1 //! runtextmacro M("string") DOES NOTHING. GREY HIGHLIGHT MAKES THIS HIGHLY MISLEADING.
  //! runtextmacro M("string")
  ///^ does something

I would appreciate if an admin could change the title of the post to "Text macros not running".
11-29-2007, 05:42 AM#2
Pyrogasm
I can see why it would be misleading when reading text in [jass] tags here on wc3c, but it makes sense that it wouldn't get compiled in the editor because it would treat it as a comment.

I would assume the compiler only looks for the //! keword at the start of linebreaks.
11-29-2007, 01:13 PM#3
Strilanc
Quote:
Originally Posted by Pyrogasm
I can see why it would be misleading when reading text in [jass] tags here on wc3c, but it makes sense that it wouldn't get compiled in the editor because it would treat it as a comment.

I would assume the compiler only looks for the [ljass[//![/ljass] keword at the start of linebreaks.

That same reasoning applies to the macro lines beginning at the start of lines. This is serious because it is also highlighted in NewGen.
12-01-2007, 02:17 AM#4
Vexorian
This is one of the reasons we should avoid everything that involves that //! syntax.

I guess someone is going to have to update the jass tag. Also add jass.vim to the queue, ouch.