summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
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/atcommand.c
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/atcommand.c')
-rw-r--r--src/map/atcommand.c5
1 files changed, 3 insertions, 2 deletions
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);