License from €75 Log in
DE EN FR ES IT CZ

lua "\n" with local data [SOLVED]

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 3 years ago
    Hello!
    Little syntax question:

    local a = "nam1\n"

    a = a.."nam2\n"
    a = a.."nam3\n"

    print(a)

    result:
    nam1
    nam2
    nam3

    --
    Now with local:

    local a = Values["name1"].Int
    local b = Values["name2"].Int
    local c = Values["name3"].Int

    a = a..b
    a = a..c

    print(a)

    how can i get the above result? (column output)

    Thanks

  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 3 years ago
    You can add multiple concatenations you know, or if you name your values cleverly, then you could even use iteration. wink

    example = example .. x .. "\n"

    or based on your example...

    local a = Values["name1"].Int
    
    local b = Values["name2"].Int
    
    local c = Values["name3"].Int
    
    
    
    local result = ""
    
    
    
    result = result .. a .. "\n" .. b .. "\n" .. c
    
    
    
    print(result)
  4. · 3 years ago
    Thank you

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?