Table Of Contents
Errors & troubleshootingThe script interpreter of EMERGENCY 4 has many faults, which can no longer be remedied. In this article typical error messages are collected and possible workarounds explained.
Unkown CommandThis problem plays an important role in EMERGENCY scripting. It is present in both EMERGENCY 3, as well as in EMERGENCY 4 and a solution is not in sight, since this requires the entire script interpreter would have to be updated.
Problem DescriptionThe problem can be triggered in two ways:
- Firstly, when a mission script and a command script use identical strings. Thus, it may happen under certain circumstances when the player completes the mission early on that some of these strings will be deleted.
- This error can also occur when in one mission script the same string is used several times, for example the name of a script relevant object.
A variant of the solution would be that you have two versions of the relevant scripts. A version for the use of the mission Script and one for use in command scripts.
For a special signal script, which is controlled by the missions script, so there are two command scripts. One which the player can control via the push buttons and one which the player does not see, but this is only intended for use in mission script.
Solution for option 2
To avoid the multiple use of a string in a mission script there is the possibility, to put in so-called global space "const char * Commands". Here, a string is written in a global map that then applies for the entire mission script.
An example for this is a „“const char NAME_OF_PEOPLE = „protesters“;„ at a demo mission.
- „protesters“ is the name of the person on the Map.
- „NAME_OF_PEOPLE“ is the const char* which is used in mission script.
Causes of the problemThe script interpreter is responsible for the preparation and scheduling of scripts. When loading a modification, then the command scripts are never terminated, unless you load a new modification or leave the game. Should there be errors thus exiting the game, or when changing the modification, then it is up to the command scripts.
Since - in contrast to the command scripts - a mission script is terminated after each mission, the error occurs here very quickly. Consequences can be here either crashes or malfunctions!
Log file analysis
?Tried to assign unknown command ' T1�(D��' to object U
… or similar forms!
The output in the log file always distinguished between "comand" and "to",since then the missing commando was trying to "reanimate".
Symbol definition errorThis problem occurs as an error message on loading a modification, when working with the modding studio.
Problem DescriptionThe problem occurs when you write a script in Modding Studio (script editor for EMERGENCY 4 scripts) and save.
The error message has the following format:
Error: Symbol XYZ is not defined in current scope.
Where "XYZ" the first thing that is in the script, so often a variable or a class.
TroubleshootingThe problem can be solved in two ways:
- One uses the template function of Modding Studio to create a script.
- One copies the script into Notepad and save it with the encoding ANSI.
739 times viewed