Page 1 of 1
Words to numbers function?
Posted: Mon Aug 27, 2012 1:03 am
by Kyoshi
I was wondering if there was a predefined function for converting a word into a number. An example:
Code: Select all
There are thirty-seven batches of wyg here.
I need to have the script send 37 to the mud instead of the word thirty-seven.
If anyone knows how to resolve this issue, please tell me! Thank you!
Re: Words to numbers function?
Posted: Mon Aug 27, 2012 8:02 am
by kevutian
Re: Words to numbers function?
Posted: Mon Aug 27, 2012 10:38 am
by Kyoshi
thanks phasma!
Re: Words to numbers function?
Posted: Tue Aug 28, 2012 3:49 am
by Delrayne
Gotta love Nick Gammon, he needs more love thrown his way.
Re: Words to numbers function?
Posted: Fri Oct 26, 2012 1:08 am
by Lezard
His function doesn't work for Mudlet, it was made for MUSH.
--> attempt to index global 'bc' (a nil value)
Is there a way to get around this?
Re: Words to numbers function?
Posted: Fri Oct 26, 2012 2:10 am
by Delrayne
you'll probably have to create any variables he uses inside a script.
Re: Words to numbers function?
Posted: Sat Oct 27, 2012 7:57 pm
by chris