作者laechan (小太保)
看板mud_sanc
標題Re: [wizs] input_to的指令用法?
時間Fri May 20 18:45:38 2011
※ 引述《justinj (黑旋風)》之銘言:
: 我將check_enter裡的改成
: -----------------------------------------------------------------
: write(ob->query("name")+"道:想要進入請繳交入城稅一萬影特幣。
: "HIR"(y/n)\n"NOR);
: input_to("pay_xxx",choice,10000);
: return 1;
: ------------------------------------------------
: pay_xxx裡的改成
: --------------------------------------------------
: write("你覺得這個問題值得思考,於是再想了一想。\n");
: input_to("pay_xxx",str,choice,money);
input_to("pay_xxx",choice,money,str);
│
對映函數 pay_xxx... ┌─────┘
↓
int pay_xxx(string str,string choice,int money)
所以依你的原意就是
┌先補一個 0 給它
↓
input_to("pay_xxx",0,money,choice);
│
┌───┘
↓
int pay_xxx(string choice,int money);
然後上面可以簡化為
input_to("pay_xxx",0,money);
int pay_xxx(string choice,int money);
↑
└你輸入的東西自動用這個變數來存
Laechan
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.117.9.179
1F:推 justinj :我發現input_to有殘留的東東... 05/20 19:43
2F:→ justinj :剛剛我將write(identify(XXX))給拿掉... 05/20 19:44
3F:→ justinj :結果會出現上敘的東東... 05/20 19:44
4F:→ justinj :沒事....我看錯了...但 05/20 19:45
5F:推 ma713 :樓上眼殘..runaway 05/20 19:49