﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 4  » Display score integer as text?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Fri, 11 Sep 2026 07:18:24 GMT</lastBuildDate><ttl>20</ttl><item><title>Display score integer as text?</title><link>https://forums.millisecond.com/Topic15296.aspx</link><description>Hi,&lt;br/&gt;I am trying to display a running score as the participant completes a task, and I am having trouble using the format function to add the score to a string that can be used as text.&lt;br/&gt;&lt;br/&gt;Here is my code, with values.score as the integer that gets updated in the task:&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&amp;lt;item scoretext&amp;gt;&lt;br/&gt;/1 = format ("Score: %i", values.score)&lt;br/&gt;&amp;lt;/item&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text scoretext&amp;gt;&lt;br/&gt;/items = scoretext&lt;br/&gt;/ position = (80%, 5%)&lt;br/&gt;/ size = (50,50)&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;When I display scoretext, all it does is show the string "Score: %i" rather than replacing %i with the integer.&lt;br/&gt;Am I supposed to use the format function in a different way?&lt;br/&gt;&lt;br/&gt;</description><pubDate>Tue, 06 Jan 2015 06:46:10 GMT</pubDate><dc:creator>Chemical_Music</dc:creator></item><item><title>RE: Display score integer as text?</title><link>https://forums.millisecond.com/Topic15299.aspx</link><description>Thank you so much!</description><pubDate>Tue, 06 Jan 2015 06:46:10 GMT</pubDate><dc:creator>Chemical_Music</dc:creator></item><item><title>RE: Display score integer as text?</title><link>https://forums.millisecond.com/Topic15298.aspx</link><description>The proper way to use a function inline is&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/score = 5&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("&amp;lt;%format(~"Score: %i~", values.score)%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;If values.score is an integer anyway, you do not need the format function at all, btw. You simply do:&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("Score: &amp;lt;%values.score%&amp;gt;")&lt;br/&gt;&amp;lt;/text&amp;gt;</description><pubDate>Mon, 05 Jan 2015 16:48:15 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>