Words to numbers function?

Post Reply
Kyoshi
Posts: 11
Joined: Sat Aug 11, 2012 5:38 pm

Words to numbers function?

Post 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!

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Words to numbers function?

Post by kevutian »


Kyoshi
Posts: 11
Joined: Sat Aug 11, 2012 5:38 pm

Re: Words to numbers function?

Post by Kyoshi »

thanks phasma! :)

Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: Words to numbers function?

Post by Delrayne »

Gotta love Nick Gammon, he needs more love thrown his way.

Lezard
Posts: 36
Joined: Wed Aug 29, 2012 6:47 pm

Re: Words to numbers function?

Post 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?

Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: Words to numbers function?

Post by Delrayne »

you'll probably have to create any variables he uses inside a script.


Post Reply