Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I Am have this script that simply have an if/else check to perform a specified action. However this issue where in this script the actions specified never seem to happen, HOWEVER the print() does print to the console so I know that the line should have executed. Any Ideas what may be wrong?
|
||||
|
Variable name should be in inverted comma's For example ccbgetcoppercubevariable('variablename') That can be a reason the action isn't executing... |
||||
|
Thanks for messaging back, but that isn't the issue since print methods after the ccbInvokeActions print just fine. |
||||
|
Try instead ccbInvokeAction(this.ActionA, currentNode); maybe that's it already. Otherwise: Do you get any error message? |
||||
|
I tried to pass the currentNode parameter and it's still no result. There is no error message either. |
||||
|
Will try the code on my machine today and then I will reply the solution if I got one.. |
||||
|
Actually I figured out why this was giving me issues, it relates to the headache of the "this" object within the action_ActionSwap.prototype.execute function there is another function I made called divisible well within that function i tried to reference the actions specified by the user with "this.ActionA" however within the divisible function this is referencing something different there for this.ActionA does not exist and nothing happens. To fix i just refactored action_ActionSwap.prototype.execute to not use the divisible function. But i could have passed this to it or save the reference to another variable accessible to that function. (Ex var me = this). |
||||
|
Great then! |
|