FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Using a number in a command

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Tue Oct 09, 2012 11:53 am    Post subject: Using a number in a command Reply with quote

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.
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Tue Oct 09, 2012 12:28 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended