[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Word number to actual number
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Word number to actual number

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Pages: 1  2 

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #15 on Mon 06 Nov 2017 06:47 AM (UTC)
Message
It looks like Lua changed its behaviour between version 5.1 (which MUSHclient uses) and 5.2.

In 5.1 only strings and numbers can be implicitly used as strings. In 5.2 a value with a "__tostring" metatable entry could be used to convert it to a string (like a "big number" value).

Thus, since ColourNote does not call "tostring" implicitly, you need to explicitly call it in the example you have provided.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #16 on Mon 06 Nov 2017 07:04 AM (UTC)
Message
Rene said:

Sorry, was a typo I meant like that.
I realised my issue what with using ColourNote, (i.e. ColourNote("white", "", convert_words_to_numbers(amount) ) for some reason that gave an error ...


It is always helpful to post the error message, rather than vaguely saying that it "gave an error".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,888 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]