Hello together,
I'm testing with Plugins and using the v_repExtPluginSkeleton as template and i am change only one Part to get
the amount of inArguments
#define LUA_GETDATA_COMMAND "simSkeleton.getData"
void LUA_GETDATA_CALLBACK(SScriptCallBack* p)
{
CStackArray inArguments;
inArguments.buildFromStack(stack);
CStackArray outArguments;
outArguments.pushInt(inArguments.getSize());
outArguments.buildOntoStack(stack);
}
And i'm only get the correct amount when one argument is an string
sim.addStatusbarMessage(simSkeleton.getData("test")) -> 1
sim.addStatusbarMessage(simSkeleton.getData(123)) -> 0
sim.addStatusbarMessage(simSkeleton.getData("test", 123, 456)) -> 3
sim.addStatusbarMessage(simSkeleton.getData(2, 123, 456)) -> 0
sim.addStatusbarMessage(simSkeleton.getData(123, "test", 456)) -> 3
I didn't understand why. Can someone explain this?
Kind regards
Plugin example Skeleton
Re: Plugin example Skeleton
Hello,
it seems you just discovered a bug. It should be:
instead of:
in file programming/common/stack/stackArray.cpp, in function buildFromStack. The common repository was corrected.
Thanks for pointing this out!
Cheers
it seems you just discovered a bug. It should be:
Code: Select all
_doubleValues.resize(s);
Code: Select all
_doubleValues.reserve(s);
Thanks for pointing this out!
Cheers