function GetStrings() local String1 = "Hi my name is" local String2 = "iLordOfAviation" return String1, String2 end local Strings = GetStrings() print(Strings[1], Strings[2])
I expected this to print "Hi my name is iLordOfAviation
" but it didn't... How do you do this?
function GetStrings() local String1 = "Hi my name is" local String2 = "iLordOfAviation" return String1, String2 end local String1, String2 = GetStrings() print(String1, String2)
Simple, isn't it? :)
Try this
local GetStrings = { String1 = "Hi my name is", String2 = "iLordOfAviation" } local Strings = GetStrings print(Strings.String1) print(Strings.String2)