Skip to content
#2889
Auto-translated
RedHeavenHero
This is due to the callback being called with a parameter. By default, the scripting engine simply adds two parentheses (and parameters, in some cases) to the name and executes the resulting code. If you call the callback with custom parameters, the code to be executed will be something like this:
'Dragon("'..hero..'")()'
that is, after calling the Dragon function, the result returned from it will be called, and since the function returns nothing, an error occurs when trying to call nil.

It can be fixed by adding two minus signs:
QuestionBox(path.."tom2.txt",'Dragon("'..hero..'")--')
then the code to be executed will look like this:
'Dragon("'..hero..'")--()'
that is, the extra parentheses will be commented out.

It helped, thank you.
Карты: Экспедиция ГрувераНаследие ШантириВременной парадоксПоиски рунной сферыПуть возвращения