Connection ErrorBad RequestSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Error Details:
Share Link
Jack_of_shadowsStatistics
Registered:
Posts:553
#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: ЧаВо