作者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