diff options
| author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-08-22 13:32:24 +0200 |
|---|---|---|
| committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-08-22 13:39:39 +0200 |
| commit | 9ea18abb49a760fe1eda197c02cbdcd680b47204 (patch) | |
| tree | f3b8a8a3e65dc313cc1a5503bc1ee473a199204d /src/scripting/script.hpp | |
| parent | bfca89de4edded82668376d2388784defbee071b (diff) | |
| download | manaserv-9ea18abb49a760fe1eda197c02cbdcd680b47204.tar.gz manaserv-9ea18abb49a760fe1eda197c02cbdcd680b47204.tar.xz manaserv-9ea18abb49a760fe1eda197c02cbdcd680b47204.zip | |
Pass a script name to Lua for proper reporting of error locations
Now the Lua file name shows up in the error message and stack traceback,
or the map file and object name in case of a script embedded in a map
file.
Diffstat (limited to 'src/scripting/script.hpp')
| -rw-r--r-- | src/scripting/script.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scripting/script.hpp b/src/scripting/script.hpp index dfba06f..6f5dded 100644 --- a/src/scripting/script.hpp +++ b/src/scripting/script.hpp @@ -61,8 +61,11 @@ class Script /** * Loads a chunk of text into script context and executes its global * statements. + * + * @param prog the program text to load + * @param name the name of the text, used for error reporting */ - virtual void load(const char *) = 0; + virtual void load(const char *prog, const char *name) = 0; /** * Loads a text file into script context and executes its global |
