Hello, iMod method is good, but you can also use @ http://net-informations.com/q/faq/multilines.html (method 1) like:
int numberPetAlive = Lua.LuaDoString<int>(@" local aliveCount = 0;
for p=1, 3 do
local petID, ability1ID, ability2ID, ability3ID, locked = C_PetJournal.GetPetLoadOutInfo(p);
if petID then
local health, maxHealth, _ = C_PetJournal.GetPetStats(petID);
if health > 0 then
aliveCount = aliveCount + 1;
end
end
end
return aliveCount;");