Does using more than one "if" in a function cause problems?
Here's the code:
[lua]
function UnitDeath(u)
u=GetTriggerUnit()
local id=GetUnitTypeId()
if id==FourCC("h000") then
Action1(u)
end
if id==FourCC("h001") then
Action2(u)
end
...
if id==FourCC("h060") then
Action60(u)
end
end
Here's the code:
[lua]
function UnitDeath(u)
u=GetTriggerUnit()
local id=GetUnitTypeId()
if id==FourCC("h000") then
Action1(u)
end
if id==FourCC("h001") then
Action2(u)
end
...
if id==FourCC("h060") then
Action60(u)
end
end