<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=Advice_for_Scripting</id>
	<title>Advice for Scripting - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=Advice_for_Scripting"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;action=history"/>
	<updated>2026-04-26T23:34:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4743&amp;oldid=prev</id>
		<title>TiMan at 09:33, 21 August 2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4743&amp;oldid=prev"/>
		<updated>2020-08-21T09:33:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:33, 21 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{stub}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Use &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;references&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Use &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;References&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are stuck trying to write a script, don't forget that you can always use Frictional's map scripts as a reference. They may help by giving concrete examples how you may use certain functions. This is particularly useful if you need to figure out how to set up a particular sequence of events that you remember from the game, for example how to set up a crowbar for use on a door along with effects, as is done in the Guest Room of [[HPL2/TDD|Amnesia – The Dark Descent]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are stuck trying to write a script, don't forget that you can always use Frictional's map scripts as a reference. They may help by giving concrete examples how you may use certain functions. This is particularly useful if you need to figure out how to set up a particular sequence of events that you remember from the game, for example how to set up a crowbar for use on a door along with effects, as is done in the Guest Room of [[HPL2/TDD|Amnesia – The Dark Descent]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Listen to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;error messages&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Listen to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Error Messages&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. The reason it gives you the final character is because, according to the compiler, the string never ends, and the code that is wrongfully included in that string is only considered as a string, rather than a piece of code. Thus, the compiler doesn't know that there are any problems until it discovers that the file ends before a closing quote is found. This kind of compiler error is usually accompanied by a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. The reason it gives you the final character is because, according to the compiler, the string never ends, and the code that is wrongfully included in that string is only considered as a string, rather than a piece of code. Thus, the compiler doesn't know that there are any problems until it discovers that the file ends before a closing quote is found. This kind of compiler error is usually accompanied by a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-4310:rev-4743 --&gt;
&lt;/table&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4310&amp;oldid=prev</id>
		<title>Mudbill: /* Listen to error messages */ typo</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4310&amp;oldid=prev"/>
		<updated>2020-08-13T21:46:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Listen to error messages: &lt;/span&gt; typo&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:46, 13 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot; &gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. The reason it gives you the final character is because, according to the compiler, the string never ends, and the code that is wrongfully included in that string is only considered as a string, rather than a piece of code. Thus, the compiler doesn't know that there are any problems until &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/del&gt;discovers that the file ends before a closing quote is found. This kind of compiler error is usually accompanied by a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. The reason it gives you the final character is because, according to the compiler, the string never ends, and the code that is wrongfully included in that string is only considered as a string, rather than a piece of code. Thus, the compiler doesn't know that there are any problems until &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;it &lt;/ins&gt;discovers that the file ends before a closing quote is found. This kind of compiler error is usually accompanied by a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-4309:rev-4310 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mudbill</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4309&amp;oldid=prev</id>
		<title>Mudbill: better flow</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4309&amp;oldid=prev"/>
		<updated>2020-08-13T21:45:37Z</updated>

		<summary type="html">&lt;p&gt;better flow&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:45, 13 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Use references ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Use references==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are stuck trying to write a script, don't forget that you can always use Frictional's map scripts as a reference. They may help by giving concrete examples how you may use certain functions. This is particularly useful if you need to figure out how to set up a particular sequence of events that you remember from the game, for example how to set up a crowbar for use on a door along with effects, as is done in the Guest Room of [[HPL2/TDD|Amnesia – The Dark Descent]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you are stuck trying to write a script, don't forget that you can always use Frictional's map scripts as a reference. They may help by giving concrete examples how you may use certain functions. This is particularly useful if you need to figure out how to set up a particular sequence of events that you remember from the game, for example how to set up a crowbar for use on a door along with effects, as is done in the Guest Room of [[HPL2/TDD|Amnesia – The Dark Descent]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Listen to error messages ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Listen to error messages==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;That &lt;/del&gt;is because, according to the compiler, the string &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;may start at one point in the script but without the closing quote, it &lt;/del&gt;never ends, and the code that is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wrongly &lt;/del&gt;included in that string is only considered as a string, rather than a piece of code. Thus, the compiler &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can&lt;/del&gt;'t know &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;exactly where &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;issue &lt;/del&gt;is. This kind of compiler error is usually &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;combined with &lt;/del&gt;a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The reason it gives you the final character &lt;/ins&gt;is because, according to the compiler, the string never ends, and the code that is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wrongfully &lt;/ins&gt;included in that string is only considered as a string, rather than a piece of code. Thus, the compiler &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;doesn&lt;/ins&gt;'t know &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;that there are any problems until to discovers that &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;file ends before a closing quote &lt;/ins&gt;is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;found&lt;/ins&gt;. This kind of compiler error is usually &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;accompanied by &lt;/ins&gt;a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-4308:rev-4309 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mudbill</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4308&amp;oldid=prev</id>
		<title>Mudbill: Added a section for &quot;reference&quot; and &quot;errors&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4308&amp;oldid=prev"/>
		<updated>2020-08-13T21:40:47Z</updated>

		<summary type="html">&lt;p&gt;Added a section for &amp;quot;reference&amp;quot; and &amp;quot;errors&amp;quot;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:40, 13 August 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and programming &lt;/del&gt;in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== Use references ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;If you are stuck trying to write a script, don't forget that you can always use Frictional's map scripts as a reference. They may help by giving concrete examples how you may use certain functions. This is particularly useful if you need to figure out how to set up a particular sequence of events that you remember from the game, for example how to set up a crowbar for use on a door along with effects, as is done in the Guest Room of [[HPL2/TDD|Amnesia – The Dark Descent]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;== Listen to error messages ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;If you get a visible error message, perhaps as a pop-up in-game or as a crash message, they always provide ''some'' hints as to where the issue lies. If you see something like &amp;lt;code&amp;gt;(123, 10)&amp;lt;/code&amp;gt; that means the [[wikipedia:Compiler|compiler]] (which is responsible for changing your human-readable code into computer readable instructions) failed to process your script, and the numbers point to where in the script file the processing started to fail. The first number represents the line number in your file, and the second number represents the character on that line. The example above then means the problems starts on line 123 and character 10.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Sometimes the numbers you see will simply point to the last line and character in your file. This often means that there is a required character missing somewhere, like a double quote for a string. That is because, according to the compiler, the string may start at one point in the script but without the closing quote, it never ends, and the code that is wrongly included in that string is only considered as a string, rather than a piece of code. Thus, the compiler can't know exactly where the issue is. This kind of compiler error is usually combined with a message along the lines of &amp;lt;code&amp;gt;Expected &amp;quot;&amp;lt;/code&amp;gt;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff::1.12:old-4299:rev-4308 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mudbill</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4299&amp;oldid=prev</id>
		<title>TiMan: Created page with &quot;This article is designed to give beginners the right mindset of approaching scripting and programming in HPL. Remember that these are just tips intended to help you – you do...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=Advice_for_Scripting&amp;diff=4299&amp;oldid=prev"/>
		<updated>2020-08-13T21:07:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This article is designed to give beginners the right mindset of approaching scripting and programming in HPL. Remember that these are just tips intended to help you – you do...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This article is designed to give beginners the right mindset of approaching scripting and programming in HPL. Remember that these are just tips intended to help you – you don't have to follow them, but they may teach you something useful.&lt;/div&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
</feed>