Scripting Stability
Soldat Dedicated Server scripting has been known to have stability issues. Here you may find a collection of many reasons why a script is unstable, and possible alternatives.
Contents
Dynamic arrays
Sometimes dynamic arrays do not initialize properly. This can be fixed by initializing the array.
my_array := [];
CrossFunc
When using CrossFunc, on rare occasions it fails.
This has not been verified.
Threads
Threading causing stability issues is a well known issue with scripting. Using ThreadFunc will call another function in a new thread. If the same function is currently being ran by two separate threads, one may end or break. After some period of time (varies drastically), threads quit out or break.
Sockets require threads to be used to avoid holdup when retrieving data. Sockets are often associated with scripting instability, but the issue is with the threading, not sockets.
Quick function calling
Invoking the same function quickly can cause stability issues.
This can be avoided by distributing your actions throughout a larger period of time, such as using AppOnIdle (although a one second delay is pretty large).
Large amount of scripts
Not sure.
Get or Set Stat
Large use of getting or setting functions (such as GetPlayerStat) may cause stability issues.
This can be avoided through the use of storing necessary information arrays.
Verification needed.
Writing to the console
If writing to the server console too quickly, the scripting core may behave less stable.
Writing to a file
If writing to a file too quickly, the scripting core may behave less stable.
This can be partially avoided by making a buffer and only writing to the file on occasion.
Functions with non-const parameters
Not sure.