Suppose you have these strings defined:
Code: Select all
[strings]
list=You get __1__ as result.
AND=and
Code: Select all
local a = "an iron gear"
game.print({"", "strings.list", a})
Code: Select all
local a = entity.get_driver()
if a then a = a. player end
local b = entity.get_passenger()
if b then b = b.player end
local output = ""
if a then output = a end
if a and b then output = output .. ' ' .. {"strings.AND"} .. ' ' end
if b then output = output .. b
game.print({"", "strings.list", output})