From 9f093e19cddfb698725d41c758c2285d0c9345c6 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 23 Oct 2006 16:12:08 +0000 Subject: - Removed useless variable in char-txt from-str char loading. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9046 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/char.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index c581629c0..f08e0a76b 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -499,13 +499,13 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg char tmp_str[3][128]; //To avoid deleting chars with too long names. int tmp_int[256]; unsigned int tmp_uint[2]; //To read exp.... - int set, next, len, i, j; + int next, len, i, j; // initilialise character memset(p, '\0', sizeof(struct mmo_charstatus)); // Char structure of version 1500 (homun + mapindex maps) - if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" + if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%d,%d,%d\t%d,%d,%d,%d,%d,%d,%d,%d%n", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], @@ -520,11 +520,11 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], &tmp_int[45], &tmp_int[35], &tmp_int[36], &tmp_int[46], &tmp_int[37], &tmp_int[38], &tmp_int[39], - &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &next)) != 48) + &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &next) != 48) { tmp_int[44] = 0; //Hom ID. // Char structure of version 1488 (fame field addition) - if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" + if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d,%d,%d,%d,%d%n", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], @@ -539,11 +539,11 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], tmp_str[1], &tmp_int[35], &tmp_int[36], tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39], - &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &next)) != 47) + &tmp_int[40], &tmp_int[41], &tmp_int[42], &tmp_int[43], &next) != 47) { tmp_int[43] = 0; //Fame // Char structure of version 1363 (family data addition) - if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" + if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d,%d,%d,%d%n", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], // @@ -558,13 +558,13 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], tmp_str[1], &tmp_int[35], &tmp_int[36], // tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39], - &tmp_int[40], &tmp_int[41], &tmp_int[42], &next)) != 46) + &tmp_int[40], &tmp_int[41], &tmp_int[42], &next) != 46) { tmp_int[40] = 0; // father tmp_int[41] = 0; // mother tmp_int[42] = 0; // child // Char structure version 1008 (marriage partner addition) - if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" + if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%127[^,],%d,%d\t%127[^,],%d,%d,%d%n", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], // @@ -578,11 +578,11 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg &tmp_int[27], &tmp_int[28], &tmp_int[29], &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], tmp_str[1], &tmp_int[35], &tmp_int[36], // - tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39], &next)) != 43) + tmp_str[2], &tmp_int[37], &tmp_int[38], &tmp_int[39], &next) != 43) { tmp_int[39] = 0; // partner id // Char structure version 384 (pet addition) - if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" + if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%127[^,],%d,%d\t%127[^,],%d,%d%n", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], // @@ -596,11 +596,11 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg &tmp_int[27], &tmp_int[28], &tmp_int[29], &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], tmp_str[1], &tmp_int[35], &tmp_int[36], // - tmp_str[2], &tmp_int[37], &tmp_int[38], &next)) != 42) + tmp_str[2], &tmp_int[37], &tmp_int[38], &next) != 42) { tmp_int[26] = 0; // pet id // Char structure of a version 1 (original data structure) - if ((set = sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" + if (sscanf(str, "%d\t%d,%d\t%127[^\t]\t%d,%d,%d\t%u,%u,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%127[^,],%d,%d\t%127[^,],%d,%d%n", &tmp_int[0], &tmp_int[1], &tmp_int[2], tmp_str[0], // @@ -614,7 +614,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg &tmp_int[27], &tmp_int[28], &tmp_int[29], &tmp_int[30], &tmp_int[31], &tmp_int[32], &tmp_int[33], &tmp_int[34], tmp_str[1], &tmp_int[35], &tmp_int[36], // - tmp_str[2], &tmp_int[37], &tmp_int[38], &next)) != 41) + tmp_str[2], &tmp_int[37], &tmp_int[38], &next) != 41) { ShowError("Char-loading: Unrecognized character data version, info lost!\n"); ShowDebug("Character info: %s\n", str); -- cgit v1.2.3-70-g09d2