From 724babffe10a6908d1510c941e5abfbe840fd271 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Wed, 17 Oct 2007 20:15:39 +0000 Subject: * 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 --- src/map/atcommand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index d5a3442e7..d5a51e933 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6321,7 +6321,7 @@ int atcommand_npcmove(const int fd, struct map_session_data* sd, const char* com int atcommand_addwarp(const int fd, struct map_session_data* sd, const char* command, const char* message) { char w1[64], w3[64], w4[64]; - int x,y,ret; + int x,y,ret=0; nullpo_retr(-1, sd); if (!message || !*message || sscanf(message, "%23s %d %d[^\n]", atcmd_player_name, &x, &y) < 3) { @@ -6333,7 +6333,8 @@ int atcommand_addwarp(const int fd, struct map_session_data* sd, const char* com sprintf(w3,"%s%d%d%d%d", atcmd_player_name,sd->bl.x, sd->bl.y, x, y); sprintf(w4,"1,1,%s.gat,%d,%d", atcmd_player_name, x, y); - ret = npc_parse_warp(w1, "warp", w3, w4); + // FIXME check if it failed [FlavioJS] + npc_parse_warp(w1, "warp", w3, w4, NULL, NULL, "console"); sprintf(atcmd_output, "New warp NPC => %s",w3); -- cgit v1.2.3-70-g09d2