This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
string.gmatch(script_string, '([^
]+)')
([^
]+)
txt = "some text"
if string.find(txt, "
") then string.gsub(txt, "(
)", "") end -- delete all instances of br tag
entry1
entry2
entry3
entry4
local parts = {}
for w in string.gmatch(stringname, '([^
] +)') do table.insert(parts,w) end
parts = {
[1] = "entry1"
[2] = "entry2"
[3] = "entry3"
[4] = "entry4"
}
local str = 'the dog chases the cat!
while the cat chases the mouse!
and the mouse goes squeak! squeak! squeak! all the way to its hidey-hole.' -- the string
local parts = {} -- create empty table
-- * return everything that doesn't equal
* --
for word in string.gmatch(str, '([^
]+)') do
table.insert(parts, word) -- insert words into table
end
for i = 1, #parts do print(parts[i]) end -- return the table entries
cat
dog
mouse
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.