Files
sfall/sslc/index.html
T

140 lines
39 KiB
HTML
Raw Normal View History

2024-03-11 02:26:55 +00:00
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <link rel="stylesheet" href="/sfall/assets/css/just-the-docs-default.css"> <link rel="stylesheet" href="/sfall/assets/css/just-the-docs-head-nav.css" id="jtd-head-nav-stylesheet"> <style id="jtd-nav-activation"> .site-nav > ul.nav-list:first-child > li:not(:nth-child(7)) > a, .site-nav > ul.nav-list:first-child > li > ul > li > a, .site-nav > ul.nav-list:first-child > li > ul > li > ul > li > a { background-image: none; } .site-nav > ul.nav-list:not(:first-child) a, .site-nav li.external a { background-image: none; } .site-nav > ul.nav-list:first-child > li:nth-child(7) > a { font-weight: 600; text-decoration: none; }.site-nav > ul.nav-list:first-child > li:nth-child(7) > button svg { transform: rotate(-90deg); }.site-nav > ul.nav-list:first-child > li.nav-list-item:nth-child(7) > ul.nav-list { display: block; } </style> <script src="/sfall/assets/js/vendor/lunr.min.js"></script> <script src="/sfall/assets/js/just-the-docs.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="/sfall/favicon.ico" type="image/x-icon"> <!-- Begin Jekyll SEO tag v2.8.0 --> <title>SSLC | sfall</title> <meta name="generator" content="Jekyll v3.9.0" /> <meta property="og:title" content="SSLC" /> <meta property="og:locale" content="en_US" /> <meta name="description" content="Sfall documentation" /> <meta property="og:description" content="Sfall documentation" /> <link rel="canonical" href="/sfall/sslc/" /> <meta property="og:url" content="/sfall/sslc/" /> <meta property="og:site_name" content="sfall" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta property="twitter:title" content="SSLC" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebPage","description":"Sfall documentation","headline":"SSLC","url":"/sfall/sslc/"}</script> <!-- End Jekyll SEO tag --> <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png"> <link rel="manifest" href="/assets/favicon/site.webmanifest"> <link rel="mask-icon" href="/assets/favicon/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileColor" content="#da532c"> <meta name="msapplication-config" content="/assets/favicon/browserconfig.xml"> <meta name="theme-color" content="#ffffff"> </head> <body> <a class="skip-to-main" href="#main-content">Skip to main content</a> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="svg-link" viewBox="0 0 24 24"> <title>Link</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE --> <symbol id="svg-external-l
2021-06-01 04:05:32 +00:00
-n no warnings
2024-03-11 02:26:55 +00:00
-b use backward compatibility mode
2021-06-01 04:05:32 +00:00
-l no logo
-p preprocess source
2022-05-30 13:00:21 +00:00
-P preprocess only (don't generate .int)
-F write full file paths in "#line" directives
2024-03-11 02:26:55 +00:00
-O optimize code (full optimization, see "Optimization" page)
-O&lt;N&gt; set specific level of optimization (0 - none, 1 - basic, 2 - full, 3 - experimental)
2021-06-01 04:05:32 +00:00
-d print debug messages
-D output an abstract syntax tree of the program
-o set output path (follows the input file name)
-s enable short-circuit evaluation for all AND, OR operators
2024-03-11 02:26:55 +00:00
-m&lt;macro&gt;[=&lt;val&gt;] define a macro named "macro" for conditional compilation
-I&lt;path&gt; specify an additional directory to search for include files
2022-05-30 13:00:21 +00:00
</code></pre></div></div> <p>The original command line option <code class="language-plaintext highlighter-rouge">-w</code> to turn on warnings no longer has an effect, since warnings are now on by default</p> <h2 id="additional-supported-syntax"> <a href="#additional-supported-syntax" class="anchor-heading" aria-labelledby="additional-supported-syntax"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Additional supported syntax </h2> <p>Syntax which requires sfall for compiled scripts to be interpreted is marked by asterisk (*).</p> <ul> <li> <p>Optional arguments in user-defined procedures. You can only use constants for default values. It basically puts those constants in place of omitted arguments.</p> <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>procedure test(variable x, variable y := 0, variable z := -1) begin
2021-06-01 04:05:32 +00:00
...
end
...
call test("value");
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>procedure test(variable x, variable y, variable z) begin
2021-06-01 04:05:32 +00:00
...
end
...
call test("value", 0, -1);
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> </li> </ul> </li> <li> <p>New logical operators <code class="language-plaintext highlighter-rouge">AndAlso</code>, <code class="language-plaintext highlighter-rouge">OrElse</code> for short-circuit evaluation of logical expressions. Using these operators allow the right part of logical expressions not to be evaluated (executed, computed) if the result is already known. This can improve the performance of running scripts.</p> <p>Example: <code class="language-plaintext highlighter-rouge">if (obj andAlso obj_pid(obj) == PID_STIMPAK) then ...</code></p> <p>If <code class="language-plaintext highlighter-rouge">obj</code> is <code class="language-plaintext highlighter-rouge">null</code>, the second condition will not be checked and your script wont fail with “obj is null” error in debug.log</p> <p>This also has an effect that a value of last computed argument is returned as a result of whole expressions, instead of always <code class="language-plaintext highlighter-rouge">false</code> (0) or <code class="language-plaintext highlighter-rouge">true</code> (1):</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>obj := false;
2021-06-01 04:05:32 +00:00
display_msg(obj orElse "something"); // will print "something"
2022-08-27 13:47:30 +00:00
</code></pre></div> </div> <p>You can also use the <code class="language-plaintext highlighter-rouge">-s</code> option to enable short-circuit evaluation for all the <code class="language-plaintext highlighter-rouge">AND</code>, <code class="language-plaintext highlighter-rouge">OR</code> operators in the script.</p> <p><strong>NOTE:</strong> Be aware that it may break some old scripts because operators behavior is changed slightly.</p> </li> <li>Conditional expressions (Python-inspired), also known as ternary operator: <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>X := value1 if (condition) else value2
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>if (condition) then
2021-06-01 04:05:32 +00:00
X := value1;
else
X := value2;
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> </li> </ul> </li> <li>To assign values, you can use the alternative assignment operator from <strong>C/Java</strong> instead of <strong>Pascal</strong> syntax. <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>x = 5;
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>x := 5;
2023-03-31 14:16:17 +00:00
</code></pre></div> </div> </li> </ul> </li> <li>Multiple variable declaration: Multiple variables can be declared on one line, separated by commas. This is an alternative to the ugly begin/end block, or the bulky single variable per line style. <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>variable a, b, c;
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>variable begin a; b; c; end
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> </li> </ul> </li> <li>Variable initialization with expressions: You can now initialize local variables with complex expressions instead of constants. <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>variable tile := tile_num(dude_obj);
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>variable tile;
2021-06-01 04:05:32 +00:00
tile := tile_num(dude_obj);
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> <p><strong>NOTE:</strong> If your expression starts with a constant (eg. <code class="language-plaintext highlighter-rouge">2 + 2</code>), enclose it in parentheses, otherwise compiler will be confused and give you errors.</p> </li> </ul> </li> <li>Hexadecimal numerical constants: Simply prefix a number with <code class="language-plaintext highlighter-rouge">0x</code> to create a hexadecimal. The numbers 0 to 9 and letters A to F are allowed in the number. The number may not have a decimal point. <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>a := 0x1000;
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>a := 4096;
2023-03-31 14:16:17 +00:00
</code></pre></div> </div> </li> </ul> </li> <li>Increment/decrement operators: <code class="language-plaintext highlighter-rouge">++</code> and <code class="language-plaintext highlighter-rouge">--</code> can be used as shorthand for <code class="language-plaintext highlighter-rouge">+= 1</code> and <code class="language-plaintext highlighter-rouge">-= 1</code> respectively. They are merely a syntactic shorthand to improve readability, and so their use is only allowed where <code class="language-plaintext highlighter-rouge">+= 1</code> would normally be allowed. <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>a++;
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>a += 1;
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> </li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">break</code> &amp; <code class="language-plaintext highlighter-rouge">continue</code> statements: They work just like in most high-level languages. <code class="language-plaintext highlighter-rouge">break</code> jumps out of the loop. <code class="language-plaintext highlighter-rouge">continue</code> jumps right to the beginning of the next iteration (see <code class="language-plaintext highlighter-rouge">for</code> and <code class="language-plaintext highlighter-rouge">foreach</code> sections for additional details). <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>while (i &lt; N) begin
2021-06-01 04:05:32 +00:00
// ...
if (/* some condition */) then break;
// ...
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>while (i &lt; N and not(breakFlag)) begin
2021-06-01 04:05:32 +00:00
// ...
if (/* condition */) then breakFlag := true;
// ...
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>for (i := 0; i &lt; N; i++) begin
2021-06-01 04:05:32 +00:00
// ...
if (/* condition */) then begin
// action
continue;
end
// else actions
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>for (i := 0; i &lt; N; i++) begin
2021-06-01 04:05:32 +00:00
// ...
if (/* condition */) then begin
// action
end else begin
// else actions
end
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">for</code> loops: Another piece of syntactic shorthand, to shorten <code class="language-plaintext highlighter-rouge">while</code> loops in many cases. Parentheses around the loop statements are recommended but not required (when not using parentheses, a semicolon is required after the 3rd loop statement). <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>for (i := 0; i &lt; 5; i++) begin
2022-05-30 13:00:21 +00:00
display_msg("i = " + i);
2021-06-01 04:05:32 +00:00
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>i := 0;
2021-06-01 04:05:32 +00:00
while (i &lt; 5) do begin
2022-05-30 13:00:21 +00:00
display_msg("i = " + i);
2021-06-01 04:05:32 +00:00
i++;
end
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> <p><strong>NOTE:</strong> <code class="language-plaintext highlighter-rouge">continue</code> statement in a <code class="language-plaintext highlighter-rouge">for</code> loop will recognize increment statement (third statement in parentheses) and will execute it before jumping back to the beginning of loop. This way you will not get an endless loop.</p> </li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">switch</code> statements: A shorthand way of writing big <code class="language-plaintext highlighter-rouge">if then else if...</code> blocks <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>switch get_attack_type begin
2021-06-01 04:05:32 +00:00
case ATKTYPE_PUNCH: display_msg("punch");
case ATKTYPE_KICK: display_msg("kick");
default: display_msg("something else");
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>variable tmp;
2021-06-01 04:05:32 +00:00
tmp := get_attack_type;
if tmp == ATKTYPE_PUNCH then begin
display_msg("punch");
end else if tmp == ATKTYPE_KICK then begin
display_msg("kick");
end else begin
display_msg("something else");
end
</code></pre></div> </div> </li> </ul> </li> <li>Procedure stringify operator <code class="language-plaintext highlighter-rouge">@</code>: Designed to make callback-procedures a better option and allow for basic functional programming. Basically it replaces procedure names preceded by <code class="language-plaintext highlighter-rouge">@</code> by a string constant. <ul> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>callbackVar := "Node000";
2022-08-27 13:47:30 +00:00
call callbackVar;
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>callbackVar := @Node000;
2022-08-27 13:47:30 +00:00
call callbackVar;
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> <p>Not many people know that since vanilla Fallout you can call procedures by “calling a variable” containing its name as a string value. There was a couple of problems using this:</p> </li> <li>optimizer wasnt aware that you are referencing a procedure, and could remove it, if you dont call it explicitly (can be solved by adding making procedure <code class="language-plaintext highlighter-rouge">critical</code>)</li> <li>you couldnt see all references of a procedure from a Script Editor</li> <li>it was completely not obvious that you could do such a thing, it was a confusing syntax</li> </ul> </li> <li>(*) <strong>Arrays</strong>: In vanilla Fallout, arrays had to be constructed by reserving a block of global/map variables. Since sfall 2.7, specific array targeted functions have been available, but they are fairly messy and long winded to use. The compiler provides additional syntactic shorthand for accessing and setting array variables, as well as for array creation. When declaring an array variable, put a constant integer in <code class="language-plaintext highlighter-rouge">[]</code>` to give the number of elements in the array. (before sfall 3.4 you had to specify size in bytes for array elements, now its not required, see “Arrays” page for more information) <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>procedure bingle begin
2021-06-01 04:05:32 +00:00
variable a[2];
a[0] := 5;
a[a[0] - 4] := a[0] + 4;
display_msg("a[0]=" + a[0] + ", a[1]=" + a[1]);
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>procedure bingle begin
2021-06-01 04:05:32 +00:00
variable a;
a := temp_array(2, 4);
set_array(a, 0, 5);
set_array(a, get_array(a, 0) - 4, get_array(a, 0) + 4);
display_msg("a[0]=" + get_array(a, 0) + ", a[1]=" + get_array(a, 1));
end
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> </li> </ul> </li> <li>(*) <strong>Array expressions</strong>: Sometimes you need to construct an array of elements and you will probably want to do it in just one expression. This is now possible: <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>list := ["A", "B", "C", "D"];
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>list := temp_array(4, 2);
2021-06-01 04:05:32 +00:00
list[0] := "A";
list[1] := "B";
list[2] := "C";
list[3] := "D";
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> <p>Syntax specific for associative arrays is also available. (see “Arrays” page for full introduction to this type of arrays).</p> </li> </ul> </li> <li>(*) <strong>Map array expressions</strong>: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>map := {5: "five", 10: "ten", 15: "fifteen", 20: "twelve"};
</code></pre></div> </div> </li> <li>(*) The dot <code class="language-plaintext highlighter-rouge">.</code> syntax to access elements of associative arrays and allow to work with arrays like objects: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trap.radius := 3;
2021-06-01 04:05:32 +00:00
trap.tile := tile_num(dude_obj);
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> <p>You can chain dot and bracket syntax to access elements of multi-dimensional arrays:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>collectionList[5].objectList[5].name += " foo";
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> <p><strong>NOTE:</strong> When using incremental operators like <code class="language-plaintext highlighter-rouge">+=</code>, <code class="language-plaintext highlighter-rouge">*=</code>, <code class="language-plaintext highlighter-rouge">++</code>, <code class="language-plaintext highlighter-rouge">--</code> compiler will use additional temp variable to get an array at penultimate level in order to avoid making the same chain of <code class="language-plaintext highlighter-rouge">get_array</code> calls twice.</p> </li> <li>(*) <code class="language-plaintext highlighter-rouge">foreach</code> loops: A shorthand method of looping over all elements in an array. Syntax is <code class="language-plaintext highlighter-rouge">foreach (&lt;symbol&gt; in &lt;expression&gt;)</code>. <ul> <li>new: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>procedure bingle begin
2021-06-01 04:05:32 +00:00
variable critter;
foreach (critter in list_as_array(LIST_CRITTERS)) begin
2022-05-30 13:00:21 +00:00
display_msg("" + critter);
2021-06-01 04:05:32 +00:00
end
end
2022-04-07 13:19:56 +00:00
</code></pre></div> </div> </li> <li>old: <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>procedure bingle begin
2021-06-01 04:05:32 +00:00
variable begin critter; array; len; count; end
array := list_as_array(LIST_CRITTERS);
len := len_array(array);
count := 0;
while count &lt; len do begin
critter := array[count];
display_msg("" + critter);
end
end
2022-05-30 13:00:21 +00:00
</code></pre></div> </div> </li> </ul> <p>If you want an index array element (or key for “maps”) at each iteration, use syntax: <code class="language-plaintext highlighter-rouge">foreach (&lt;symbol&gt;: &lt;symbol&gt; in &lt;expression&gt;)</code></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>foreach (pid: price in itemPriceMap) begin
if (itemPid == pid) then
itemPrice := price;
2021-06-01 04:05:32 +00:00
end
2023-08-09 00:25:41 +00:00
</code></pre></div> </div> <p>If you want to add additional condition for continuing the loop, use syntax: <code class="language-plaintext highlighter-rouge">foreach (&lt;symbol&gt; in &lt;expression&gt; while &lt;expression&gt;)</code>. In this case loop will iterate over elements of an array until last element or until “while” expression is true (whatever comes first).</p> <p><strong>NOTE:</strong> Just like <code class="language-plaintext highlighter-rouge">for</code> loop, <code class="language-plaintext highlighter-rouge">continue</code> statement will respect increments of a hidden counter variable, so you can safely use it inside <code class="language-plaintext highlighter-rouge">foreach</code>.</p> </li> </ul> <h2 id="fixes"> <a href="#fixes" class="anchor-heading" aria-labelledby="fixes"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Fixes </h2> <ul> <li><code class="language-plaintext highlighter-rouge">playmoviealpharect</code> was using the token for <code class="language-plaintext highlighter-rouge">playmoviealpha</code>, breaking both functions in the process.</li> <li><code class="language-plaintext highlighter-rouge">addbuttonflag</code> had an entry in the token table, and could be parsed, but was missing an entry in the emit list. This resulted in the compiler accepting it as a valid function, but not outputting any code for it into the compiled script.</li> <li>The function <code class="language-plaintext highlighter-rouge">tokenize</code> was missing an entry in the token table, and so would not be recognised by the compiler.</li> <li>Fixed the check for the <code class="language-plaintext highlighter-rouge">call "foo"</code> syntax so that non-string constants will no longer be accepted.</li> </ul> <h2 id="backward-compatibility"> <a href="#backward-compatibility" class="anchor-heading" aria-labelledby="backward-compatibility"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Backward compatibility </h2> <p>There are several changes in this version of sslc which may result in problems for previously working scripts. A new command line option <code class="language-plaintext highlighter-rouge">-b</code> is available, which will turn off all new fixes and features which have the possibility of causing a previously compiling script to change its behaviour. (And only those features; anything which would not compile under the old sslc is not affected.) This includes the following:</p> <ul> <li>Since <code class="language-plaintext highlighter-rouge">for</code>, <code class="language-plaintext highlighter-rouge">foreach</code>, <code class="language-plaintext highlighter-rouge">break</code>, <code class="language-plaintext highlighter-rouge">continue</code>, <code class="language-plaintext highlighter-rouge">in</code> and <code class="language-plaintext highlighter-rouge">tokenize</code> are now hardcoded names, existing scripts that use any of them as a variable or procedure name will no longer compile.</li> <li>Missing a semicolon after a variable declaration is now a hard error. (Originally sslc would check for the semicolon, but would not complain if it was missing.)</li> <li>The function <code class="language-plaintext highlighter-rouge">addbuttonflag</code> used to be recognised by the compiler, but would not emit any code into the int file.</li> <li>The function <code class="language-plaintext highlighter-rouge">playmoviealpharect</code> compiled as <code class="language-plaintext highlighter-rouge">playmoviealpha</code>.</li> </ul> <h2 id="int2ssl-note"> <a href="#int2ssl-note" class="anchor-heading" aria-labelledby="int2ssl-note"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> int2ssl note </h2> <p><strong>int2ssl</strong> by Anchorite (TeamX) is included in sfall modderspack package. It was updated to support all additional opcodes of sfall, along with some syntax features. You can use it to decompile any sfall or non-sfall script.</p> </main> </div> </div> <div class="sea