Using a number in a command

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Using a number in a command

by Roody_Yogurt » Tue Oct 09, 2012 12:28 pm

You want to use the number grammar token in your verb definition:

verb "pay"
* number DoPay

When DoPay is performed, the object global is set to the number entered.

Your second example command is harder to do, as it's generally impossible to support commands with no separator words between the object and xobject without some trickery, like:

verb "pay"
* "agent" number DoAgentPay

Using a number in a command

by Tdarcos » Tue Oct 09, 2012 11:53 am

Is there a way to have a number as a command short of putting every number as a verb option like I did in Teleporter Test, so that someone can type:

PAY 3500

or

PAY AGENT 3500

and be able to have any number in the number range?

Right now I'm having the operator calculate amounts due, but if someone was in an auction they might post a bid or for other purposes.

Top