BehaviorTree.CPP icon indicating copy to clipboard operation
BehaviorTree.CPP copied to clipboard

Allow concatenation of string and numbers in scripting

Open bochen87 opened this issue 1 year ago • 2 comments

Currently, only concatenation of strings is allowed. Trying to concatenate a number and a string leads to a runtime error https://github.com/BehaviorTree/BehaviorTree.CPP/blob/58326a8a08d9c51e2ed8674aef3710bb6209867b/include/behaviortree_cpp/scripting/operators.hpp#L255

It would be nice to also allow concatenation of string and numbers

bochen87 avatar Feb 13 '24 08:02 bochen87

I can see the use case, I will put this on my list of "todo".

facontidavide avatar Feb 13 '24 10:02 facontidavide

I can see the use case, I will put this on my list of "todo".

I made a PR https://github.com/BehaviorTree/BehaviorTree.CPP/pull/771

bochen87 avatar Feb 13 '24 12:02 bochen87