I am creating a console application(.exe). I have embedded squirrel in it.
I have successfully loaded a .nut file. I can call functions in .nut file. No problems.
But the problem is i want to return three values when a C++ function is called from squirrel.
Usually, we do
Code: [Select] But i want to return three values. How? They are float x,y,z;
Can anyone tell me a simple way to do it. Perhaps like creating a class
Code: [Select] Something like this?
Thanks
I have successfully loaded a .nut file. I can call functions in .nut file. No problems.
But the problem is i want to return three values when a C++ function is called from squirrel.
Usually, we do
sq_pushinteger(val);
return 1; //because we are returning something;
Can anyone tell me a simple way to do it. Perhaps like creating a class
class Position
{
float x;
float y;
float z;
};
Position a;
...
sq_pushobject(v, &a);
sq_newclass(v, true);
Thanks