Expected ; even when there is one.[solved]

Started by Icey, Sun 24/06/2012 20:29:12

Previous topic - Next topic

Icey

So tried to run the game when I get an saying expected ;. I looked and seen there is already one.
Code: AGS
Features.Text = "ATK+: %d  DEF+: %d",_DawnStorm, _DawnStormDEF;

Khris

AGS expects the semicolon after the string; you can't put values inside strings like that, you need String.Format:
Code: ags
Features.Text = String.Format("ATK+: %d  DEF+: %d", _DawnStorm, _DawnStormDEF);

Icey

Oh how foolish of me. I have to do that for displaying HP/MP and stuff. But still, thanks. As long as I remember that then I shouldn't run into this prob again.

SMF spam blocked by CleanTalk