AGS Engine

Further development of AGS engine

Bug Issue: %%

Pages: [1]

Radiant

  • AGSer
  • Posts: 5,134
  • Return once more to the Two Kingdoms!
« on: 27 Aug 2017, 20:55 »
Since % is a control character when printing strings, the C-standard is to render '%%' as '%' (since otherwise it would not be possible to output percent signs). Earlier versions of AGS adhere to this standard, but 3.X does not: it displays it as a double %.

Crimson Wizard

  • AGSer
  • Posts: 7,594
« Reply #1 on: 31 Aug 2017, 13:21 »
I think some elaboration needed on what render method is referred. The control characters are meant for "format" argument in functions like printf family (in C) or Say & Display. String.Format etc in AGS, but I doubt if other means to display strings as non-formatted, like e.g. GUI text, were meant to work same way.

What I mean, for example, if you do printf("%%") in C it will print single %, but if you do printf("%s", "%%") it will display both %, because these percent signs are not in a format string but just in a string argument.
« Last Edit: 31 Aug 2017, 13:28 by Crimson Wizard »

Radiant

  • AGSer
  • Posts: 5,134
  • Return once more to the Two Kingdoms!
« Reply #2 on: 31 Aug 2017, 18:35 »
StrFormat (buf, "%d%%",  wis) renders a single % in AGS2 and a double % in AGS3 (where the proper workaround is \% instead of %%)

Crimson Wizard

  • AGSer
  • Posts: 7,594
« Reply #3 on: 01 Sep 2017, 16:55 »
StrFormat (buf, "%d%%",  wis) renders a single % in AGS2 and a double % in AGS3 (where the proper workaround is \% instead of %%)

This was fixed in 3.3.5 (noted in changelog).

Issue updated by Crimson Wizard
« Reply #4 on: 04 Sep 2017, 17:15 »
  • Fixed Version changed from (none) to AGS 3.3.5
  • Status changed from New to Closed

Pages: [1]

Issue Details

  • Reported
    27 Aug 2017, 20:55
  • Updated
    04 Sep 2017, 17:15
  • View Status
    Public
  • Type
    Bug
  • Status
    Closed
  • Priority
    Normal
  • Version
    Adventure Game Studio 3.3
  • Fixed in
    AGS 3.3.5
  • Assigned to
    (none)
  • Category
    Scripts

Tags



Powered by: SMF Project Tools 0.5.4 © Niko Pahajoki 2007-2011