[MudWalker] math.random?

Kevin Reid kpreid
Thu Jul 7 05:10:55 PDT 2005


On Jul 4, 2005, at 4:25, Andrew Cantino wrote:

> Hello.  I can't seem to get math.random to work in any form.
> With this code:
>
> a = math.random
> message(a)
>
> I get errors like:
>
> *** -[NSConcreteValue length]: selector not recognized [self = 
> 0x4c92940]

math.random is a function, so you must call it:

   a = math.random()

message expects a string, and a is now a number:

   message(tostring(a))

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the MudWalker mailing list