From 97001710c06ed7053d18c8baaac602eb563b64b3 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 27 Aug 2013 08:08:34 +0200 Subject: Introducing the Hercules Standalone Script Syntax Checker - Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another. --- src/map/npc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/npc.h') diff --git a/src/map/npc.h b/src/map/npc.h index 5ec201e55..10f3406b4 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -140,7 +140,7 @@ struct npc_interface { struct npc_src_list *src_files; struct unit_data base_ud; /* */ - int (*init) (void); + int (*init) (bool minimal); int (*final) (void); /* */ int (*get_new_npc_id) (void); @@ -218,7 +218,7 @@ struct npc_interface { void (*parse_mob2) (struct spawn_data *mobspawn); const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath); - void (*parsesrcfile) (const char *filepath, bool runOnInit); + int (*parsesrcfile) (const char *filepath, bool runOnInit); int (*script_event) (struct map_session_data *sd, enum npce_event type); void (*read_event_script) (void); int (*path_db_clear_sub) (DBKey key, DBData *data, va_list args); -- cgit v1.2.3-60-g2f50