Error messages (EM4)

Information: The EMERGENCY community board is completely free and is financed by advertisement. Please deactivate adblocker if you use this site. Thank you!
  • Information about script error messages in EMERGENCY 4.

    1 Errors & troubleshooting

    The 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.

    1.1 Unkown Command

    This 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.

    1.1.1 Problem Description

    The 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.

    Solution for option 1

    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.

    Instead of “if (obj→HasName(„protesters“))„ is now “if (obj→HasName(NAME_OF_PEOPLE))„ written and already recognizes the script interpreter the string only once - namely in global space.

    1.1.2 Causes of the problem

    The 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!

    1.1.3 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".

    1.2 Symbol definition error

    This problem occurs as an error message on loading a modification, when working with the modding studio.

    1.2.1 Problem Description

    The 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.

    1.2.2 Troubleshooting

    The 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.