]> granicus.if.org Git - nethack/commitdiff
avoid some glitches with a handheld compiler I was trying out
authornethack.allison <nethack.allison>
Sat, 6 Jul 2002 16:26:35 +0000 (16:26 +0000)
committernethack.allison <nethack.allison>
Sat, 6 Jul 2002 16:26:35 +0000 (16:26 +0000)
src\muse.c(904) : error C2143: syntax error : missing ';' before '__try'
src\muse.c(904) : warning C4091: ' ' : ignored on left of 'int ' when no variable is declared
src\muse.c(904) : error C2059: syntax error : '='
src\muse.c(916) : error C2059: syntax error : '__try'

src/muse.c

index 36189a40741e566226a62d9ca99c6d7f47821835..505a583239f4837420aece96022ec0fc18caa9ab 100644 (file)
@@ -901,7 +901,7 @@ struct monst *mtmp;
 {
        struct permonst *pm = mtmp->data;
        int difficulty = monstr[(monsndx(pm))];
-       int try = 0;
+       int trycnt = 0;
 
        if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data)
                        || pm->mlet == S_GHOST
@@ -913,7 +913,7 @@ struct monst *mtmp;
        switch (rn2(8 + (difficulty > 3) + (difficulty > 6) +
                                (difficulty > 8))) {
                case 6: case 9:
-                       if (level.flags.noteleport && ++try < 2)
+                       if (level.flags.noteleport && ++trycnt < 2)
                            goto try_again;
                        if (!rn2(3)) return WAN_TELEPORTATION;
                        /* else FALLTHRU */