<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Set.string</id>
	<title>Set.string - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Set.string"/>
	<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Set.string&amp;action=history"/>
	<updated>2026-12-03T22:13:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://agiwiki.sierrahelp.com//index.php?title=Set.string&amp;diff=13095&amp;oldid=prev</id>
		<title>Andrew Korson: Created page with &quot;The &#039;&#039;&#039;set.string&#039;&#039;&#039; command assigns the text of a message to a string.  == Syntax ==  set.string(str sA, msg mB);&lt;br /&gt; set.string(str sA, &quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Set.string&amp;diff=13095&amp;oldid=prev"/>
		<updated>2019-04-22T01:07:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;set.string&amp;#039;&amp;#039;&amp;#039; command assigns the text of a message to a string.  == Syntax ==  set.string(&lt;a href=&quot;/index.php/String&quot; title=&quot;String&quot;&gt;str&lt;/a&gt; sA, &lt;a href=&quot;/index.php/Message&quot; title=&quot;Message&quot;&gt;msg&lt;/a&gt; mB);&amp;lt;br /&amp;gt; set.string(&lt;a href=&quot;/index.php/String&quot; title=&quot;String&quot;&gt;str&lt;/a&gt; sA, &amp;quot;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;set.string&amp;#039;&amp;#039;&amp;#039; command assigns the text of a message to a string.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
set.string([[string|str]] sA, [[message|msg]] mB);&amp;lt;br /&amp;gt;&lt;br /&gt;
set.string([[string|str]] sA, &amp;quot;message text&amp;quot;);&amp;lt;br /&amp;gt;&lt;br /&gt;
sA = mB;&amp;lt;br /&amp;gt;&lt;br /&gt;
sA = &amp;quot;message text&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
[[String]]s are limited to 40 characters (including the null terminator). If the [[message]] text is longer than 40 characters, the string only uses the first 40. This is one of the few situations where AGI actually checks and prevents buffer overflow.&lt;br /&gt;
&lt;br /&gt;
The number of strings available in AGI is 24 (s0 - s23), except for [[versions]] 2.089, 2.272 and 3.002.149, which have a limit of 12 (s0 - s11).&lt;br /&gt;
&lt;br /&gt;
The very first string (s0) is reserved by AGI as the player [[input prompt]].&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
AGI does not check that &amp;#039;&amp;#039;&amp;#039;sA&amp;#039;&amp;#039;&amp;#039; is a valid string. If a value greater than the limit is used, AGI will write over areas of memory that contains game state data and the main program executable code. This will almost certainly [[crash AGI]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
set.string(s5, &amp;quot;a sample message&amp;quot;);&lt;br /&gt;
s5 = &amp;quot;another sample message&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 114 (0x72 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[String Commands]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Korson</name></author>
	</entry>
</feed>