summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-17 20:15:39 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-17 20:15:39 +0000
commit724babffe10a6908d1510c941e5abfbe840fd271 (patch)
tree44191aa270ab766d2ccc6e6671cbc4596c1e18a8 /src/map/script.h
parenta4c3bb6153b6fd1a8d54abde6f7d9ecd593a4e4d (diff)
downloadhercules-724babffe10a6908d1510c941e5abfbe840fd271.tar.gz
hercules-724babffe10a6908d1510c941e5abfbe840fd271.tar.bz2
hercules-724babffe10a6908d1510c941e5abfbe840fd271.tar.xz
hercules-724babffe10a6908d1510c941e5abfbe840fd271.zip
* Reworked the parsing at npc.c.
- Fixes npc.c discarding the '}' at the end of file, when there is no newline. (uncovered as a side-effect of r11487) * Empty script functions always have code now (won't report as missing when you try to call them). * Changed userfunc_db to not limit the name to 50 characters. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11502 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/script.h b/src/map/script.h
index 9783eeb3b..1e92f73d1 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -63,9 +63,14 @@ struct script_state {
enum script_parse_options {
SCRIPT_USE_LABEL_DB = 0x1,// records labels in scriptlabel_db
- SCRIPT_IGNORE_EXTERNAL_BRACKETS = 0x2// ignores the check for {} brackets around the script
+ SCRIPT_IGNORE_EXTERNAL_BRACKETS = 0x2,// ignores the check for {} brackets around the script
+ SCRIPT_RETURN_EMPTY_SCRIPT = 0x4// returns the script object instead of NULL for empty scripts
};
+const char* skip_space(const char* p);
+const char* script_print_line(const char* p, const char* mark, int line);
+void script_error(const char *src,const char *file,int start_line, const char *error_msg, const char *error_pos);
+
struct script_code* parse_script(const char* src,const char* file,int line,int options);
void run_script_sub(struct script_code *rootscript,int pos,int rid,int oid, char* file, int lineno);
void run_script(struct script_code*,int,int,int);