Skip to content
User Avatar
#5015
Auto-translated
It seems I have a very rare case.
1) I've already used this command and wrote "heroname," and it works, and still does.
2) The console doesn't say anything about my error, either when interacting with the object or afterward.
You would do better to listen to advice and fix obvious errors instead of saying that something works somewhere. The function receives the 'hero' variable, so it should be used further. Somewhere else in the code, you accidentally created a global variable with the name 'heroname' and assigned it the name of the main hero. That's why, during testing, it seemed to you that this function worked as it should. But it's just a coincidence that could disappear at any moment.

I described debugging methods in my FAQ. To make the console work at full capacity, you need to use debug messages. Before/after/inside the function, before/after the trigger.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо

Statistics

Welcome our newest member: leyu