Minor edits to sslc document

This commit is contained in:
NovaRain
2022-07-22 22:22:48 +08:00
parent f29720effa
commit d0fa304035
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -234,12 +234,12 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
- old: - old:
``` ```
callbackVar := "Node000"; callbackVar := "Node000";
callbackVar(); call callbackVar;
``` ```
- new: - new:
``` ```
callbackVar := @Node000; callbackVar := @Node000;
callbackVar(); call callbackVar;
``` ```
Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this: Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this:
- optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`) - optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`)
+1 -1
View File
@@ -265,7 +265,7 @@ GEM
thread_safe (0.3.6) thread_safe (0.3.6)
typhoeus (1.4.0) typhoeus (1.4.0)
ethon (>= 0.9.0) ethon (>= 0.9.0)
tzinfo (1.2.9) tzinfo (1.2.10)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo-data (1.2021.1) tzinfo-data (1.2021.1)
tzinfo (>= 1.0.0) tzinfo (>= 1.0.0)
+2 -2
View File
@@ -242,12 +242,12 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
- old: - old:
``` ```
callbackVar := "Node000"; callbackVar := "Node000";
callbackVar(); call callbackVar;
``` ```
- new: - new:
``` ```
callbackVar := @Node000; callbackVar := @Node000;
callbackVar(); call callbackVar;
``` ```
Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this: Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this:
- optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`) - optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`)