Plugin example Skeleton

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 2
Joined: 10 Apr 2018, 09:59

Plugin example Skeleton

Post by xanobis » 11 Dec 2018, 16:21

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;

CStackArray outArguments;

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

Site Admin
Posts: 6914
Joined: 14 Dec 2012, 00:25

Re: Plugin example Skeleton

Post by coppelia » 12 Dec 2018, 11:27


it seems you just discovered a bug. It should be:

Code: Select all

instead of:

Code: Select all

in file programming/common/stack/stackArray.cpp, in function buildFromStack. The common repository was corrected.

Thanks for pointing this out!


Post Reply