How to give GDevelop variable string value generated in C++?

I generating item name like in Diablo or Torchlight using a C++ function. How to export string value to GDevelop variable? scene.GetVariables().Get(“Rarity”) = rarity; didn’t work. Please help.

Not sure, maybe with the setter methods (SetValue, SetString)? : Variable.h
Plus, the variable class has overloaded operators to work with them easily, I found it right now :slight_smile: