GameBuilder GameBuilder - 4 months ago 5x Question

How do I use a variable instead of a literal string?

I have a function:

Private Function generateXMLSchema(ZRouteName) As String

Dim generatedXmlSchema As String ="<Name>tEST 250504</Name>"

Where the value of the "Name" element is a literal string.

I want to use the variable
instead of the literal string:


I am getting the error: "Syntax Error".

Please help to rectify this.


You need to use the ampersand (&) to concatenate your variable to the string like this

"<Name>" & ZRouteName & "</Name>"