MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: register_function line





On Tue, 28 May 1996, Diana L Harris wrote:

> 
> Okay, I'm adding a built-in to a MOO called 'distance'. A sample call to
> distance would be:  ;distance({1.0,2.0,3.0},{4.0,5.0,6.0})   => some float
> 
> To add this, what line(s) would I put before the first opening bracket ({)
> of the code?
> I have:
> float bf_distance(float stop[3], float start[3])
> {
> [... the code ...]
> }
>  
> Also, what would the register_function(???) be? I tried:
> register_function("distance",2,2,bf_distance,TYPE_LIST,TYPE_LIST);
> but when I compiled I got something like arg 4 being passed to 
> register_function is incompatible (Note: It did compile anyway.)
> 
> The way I had it orginally it compiled, but when I called it it paniced the
> server, and had 'Caught Signal 11' in the log. 
> 
> Thanks in advance for your help.
> 
> 

The register line looked fine, did you notice that 
arglist.v.list[i].v.fnum was a pointer?


Follow-Ups: References:

Home | Subject Index | Thread Index