compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Braced `__emit` doesn't work for expressions.

Open Y-Less opened this issue 6 years ago • 4 comments

Issue description:

According to the (very minimal) __emit documentation (currently all in various pull requests instead of the wiki) __emit{} syntax should be valid in expressions.

Minimal complete verifiable example (MCVE):

main()
{
    new a = __emit { ZERO.pri };
}

Gives:

D:\work\SA-MP\gamemodes\varfunc.pwn(7) : error 001: expected token: ";", but found "-identifier-"
D:\work\SA-MP\gamemodes\varfunc.pwn(7) : error 017: undefined symbol "ZERO"
D:\work\SA-MP\gamemodes\varfunc.pwn(7) : error 029: invalid expression, assumed zero
D:\work\SA-MP\gamemodes\varfunc.pwn(7) : fatal error 107: too many error messages on one line

Workspace Information:

  • Compiler version:
  • Command line arguments provided (or sampctl version):
  • Operating System:

Y-Less avatar Sep 23 '19 19:09 Y-Less