43 001
modifications
mAucun résumé des modifications |
(Programmation défensive) |
||
Ligne 56 : | Ligne 56 : | ||
then local pokemon_without_form = mw.ustring.gsub(pokemon, replacing, "") | then local pokemon_without_form = mw.ustring.gsub(pokemon, replacing, "") | ||
local form = replaced | local form = replaced | ||
local pokemon_types = data_types[pokemon_without_form] | |||
if pokemon_types | |||
then local pokemon_types_form = pokemon_types[form] | |||
if pokemon_types_form | |||
then pokemon_type = pokemon_types_form[1] | |||
else pokemon_type = pokemon_types[1][1] | |||
end | |||
else pokemon_type = "" | |||
end | |||
break | break | ||
end | end | ||
end | end | ||
if not pokemon_type | if not pokemon_type | ||
then | then local pokemon_types = data_types[pokemon] | ||
if pokemon_types | |||
then pokemon_type = pokemon_types[1][1] | |||
else pokemon_type = "" | |||
end | |||
end | end | ||
end | end |