callOnChildren

Expanding and utilizing the engine via C++.
6 posts Page 1 of 1
newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
by newaged » Thu Jan 21, 2016 5:41 am
Ran into another problem I managed to fix. If this isn't the right forums for posts like these, or if I should be doing this on github, please let me know.
Anyways, the simgroup/simset function callOnChildren wasn't working, so I changed

Code: Select all

void SimSet::callOnChildren(simSet.cpp line 232) { ... ConsoleValueRef args[21]; args[0] = method.c_str();
to this

Code: Select all

ConsoleValue vals[2]; ConsoleValueRef args[21]; vals[0].init(); vals[0].setStringValue(method.c_str()); args[0].value = &vals[0]; vals[1].init(); args[1].value = &vals[1];
and things started to work again. Was that the right way to go about it?
Last edited by newaged on Thu Jan 21, 2016 10:00 pm, edited 1 time in total.
Mud-H
Posts: 183
Joined: Thu Feb 19, 2015 3:08 pm
by Mud-H » Thu Jan 21, 2016 7:16 am
Was it causing a crash? I stopped using the callOnChildren after it caused too much crash, also if I remember right it was not always working correctly when it wasn't causing crash...
newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
by newaged » Thu Jan 21, 2016 7:33 am
Was it causing a crash? I stopped using the callOnChildren after it caused too much crash, also if I remember right it was not always working correctly when it wasn't causing crash...
Yeah, it was causing a crash before. I haven't used it enough to comment on the second problem.
JeffR
Steering Committee
Steering Committee
Posts: 840
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Thu Jan 21, 2016 9:09 pm
Yeah, if you feel you have a useful addition or fix, feel free to toss it up onto github. Bit easier to test/review it that way, but also feel free to make a thread bringing attention to it :)

I'll have to give this fix a go. I don't REMEMBER having problems with callOnChildren, but then, I haven't used it a ton.
newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
by newaged » Thu Jan 21, 2016 10:02 pm
Updated the code - removed some pointless changes

@
User avatar
JeffR
I'll look into posting these fixes on github. Should they be batched together or done individually?
Azaezel
Posts: 409
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Thu Jan 21, 2016 10:07 pm
fwiw, PRs with a given task show up when checking a files history on the github website so that'd help folks understand the why on changes. Least that's the personal rule of thumb...
6 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests