Skip to content
User Avatar
#851
Auto-translated
Dyrman
What if the error is generated by the game, like:
"attempt to call a nil value"
And the line needs to be removed only in one case.
_ERRORMESSAGE = "attempt to call a nil value" ?
Then the first option will work.
errormsg = _ERRORMESSAGE
function _ERRORMESSAGE(string)
if string ~= "attempt to call a nil value" then
errormsg(string)
end
end
Such an error could occur when passing a message to a function (...Box) with an argument.
For example, MessageBox(path..'a.txt','yes("'..hero..'")'). In this case, other tricks are needed, namely return parse('') at the end of this function (yes).
function yes(hero)
...
return parse('')
end
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4

Statistics

Welcome our newest member: leyu