Jump to content

[SOLVED] Documentation of callback functions


photo

Recommended Posts

Hi

 

it will be nice to have example of header of callback function.

 

For example:

Function for setContactCallback(string function, variable arg0 = 0, variable arg1 = 0).

Then the called function must have header: contact_callback(Body body, int num, variable arg0, variable arg1)

Without check sample of it, i cannot figurated why cannot compile function with header: contact_callback(variable arg0, variable arg1)

 

Honya

Link to comment
  • 1 month later...

Hi Honya,

 

You're absolutely right! We'll add callback signatures to docs, thank you. :)

 

P.S. actually, there are four possible ways you can define contact callback

contact_callback(Body body);
contact_callback(Body body, int num);
contact_callback(Body body, int num, variable arg0);
contact_callback(Body body, int num, variable arg0, variable arg1);
Link to comment
×
×
  • Create New...