summaryrefslogtreecommitdiffstats
path: root/mbbsd/guess.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-07-30 14:54:40 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-07-30 14:54:40 +0800
commitc0c9d87226fcdd179335b6f7356499ce05219b09 (patch)
tree6fc81a1bab6ff112288402fcef31a9a3425a1e4c /mbbsd/guess.c
parent9c890899dc1ffab3a2ba67402c3dcb7b3e0e4f02 (diff)
downloadpttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.tar
pttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.tar.gz
pttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.tar.bz2
pttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.tar.lz
pttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.tar.xz
pttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.tar.zst
pttbbs-c0c9d87226fcdd179335b6f7356499ce05219b09.zip
use correct type: size_t/int/long/pointer
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2153 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/guess.c')
-rw-r--r--mbbsd/guess.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mbbsd/guess.c b/mbbsd/guess.c
index 98425b66..77914147 100644
--- a/mbbsd/guess.c
+++ b/mbbsd/guess.c
@@ -246,7 +246,7 @@ guess_main(void)
Diff_Random(answer);
move(2, 0);
clrtoeol();
- prints("您下注 :%lu Ptt$", money);
+ prints("您下注 :%d Ptt$", money);
getdata_str(4, 0, "您要和電腦比賽嗎? <y/n>[y]:",
ifcomputer, sizeof(ifcomputer), LCECHO, "y");
@@ -292,29 +292,29 @@ guess_main(void)
if (count > c_count) {
outs("你輸給電腦了");
move(18, 35);
- prints("你賠了 %lu ", money);
+ prints("你賠了 %d ", money);
if ((file = fopen(LOGPASS, "a"))) {
fprintf(file, "電腦第%d次猜中, ", c_count);
if (youwin)
fprintf(file, "%s 第%d次猜中, ", cuser.userid, count);
else
fprintf(file, "%s 沒猜中, ", cuser.userid);
- fprintf(file, "電腦賺走了%s %ld Ptt$\n", cuser.userid, money);
+ fprintf(file, "電腦賺走了%s %d Ptt$\n", cuser.userid, money);
fclose(file);
}
} else if (count < c_count) {
outs("真厲害, 讓你賺到囉");
move(18, 35);
- prints("你賺走了 %lu ", money * 2);
+ prints("你賺走了 %d ", money * 2);
demoney(money * 2);
if ((file = fopen(LOGPASS, "a"))) {
fprintf(file, "id: %s, 第%d次猜中, 電腦第%d次猜中, "
- "贏了電腦 %ld Ptt$\n", cuser.userid, count,
+ "贏了電腦 %d Ptt$\n", cuser.userid, count,
c_count, money * 2);
fclose(file);
}
} else {
- prints("真厲害, 和電腦打成平手了, 拿回本錢%lu\n", money);
+ prints("真厲害, 和電腦打成平手了, 拿回本錢%d\n", money);
demoney(money);
if ((file = fopen(LOGPASS, "a"))) {
fprintf(file, "id: %s 和電腦打成了平手\n", cuser.userid);
@@ -330,14 +330,14 @@ guess_main(void)
if (count < 5) {
outs("真厲害, 錢被你賺走了");
if ((file = fopen(LOGPASS, "a"))) {
- fprintf(file, "id: %s, 第%d次猜中, 贏了 %ld Ptt$\n",
+ fprintf(file, "id: %s, 第%d次猜中, 贏了 %d Ptt$\n",
cuser.userid, count, TABLE[count] * money);
fclose(file);
}
} else if (count > 5) {
outs("唉, 太多次才猜出來了");
if ((file = fopen(LOGPASS, "a"))) {
- fprintf(file, "id: %s, 第%d次才猜中, 賠了 %ld Ptt$\n",
+ fprintf(file, "id: %s, 第%d次才猜中, 賠了 %d Ptt$\n",
cuser.userid, count, money);
fclose(file);
}
@@ -345,9 +345,9 @@ guess_main(void)
outs("五次猜出來, 還你本錢吧");
move(18, 35);
clrtoeol();
- prints("你拿回了%lu Ptt$\n", money);
+ prints("你拿回了%d Ptt$\n", money);
if ((file = fopen(LOGPASS, "a"))) {
- fprintf(file, "id: %s, 第%d次猜中, 拿回了本錢 %lu Ptt$\n",
+ fprintf(file, "id: %s, 第%d次猜中, 拿回了本錢 %d Ptt$\n",
cuser.userid, count, money);
fclose(file);
}
@@ -361,7 +361,7 @@ guess_main(void)
move(18, 35);
outs("下次再來吧");
if ((file = fopen(BBSHOME "/etc/loseguess.log", "a"))) {
- fprintf(file, "id: %s 賭了 %ld Ptt$\n", cuser.userid, money);
+ fprintf(file, "id: %s 賭了 %d Ptt$\n", cuser.userid, money);
fclose(file);
}
unlockutmpmode();